MCPcopy Index your code
hub / github.com/python/cpython / main

Function main

Lib/dis.py:1139–1162  ·  view source on GitHub ↗
(args=None)

Source from the content-addressed store, hash-verified

1137
1138
1139def main(args=None):
1140 import argparse
1141
1142 parser = argparse.ArgumentParser(color=True)
1143 parser.add_argument('-C', '--show-caches', action='store_true',
1144 help='show inline caches')
1145 parser.add_argument('-O', '--show-offsets', action='store_true',
1146 help='show instruction offsets')
1147 parser.add_argument('-P', '--show-positions', action='store_true',
1148 help='show instruction positions')
1149 parser.add_argument('-S', '--specialized', action='store_true',
1150 help='show specialized bytecode')
1151 parser.add_argument('infile', nargs='?', default='-')
1152 args = parser.parse_args(args=args)
1153 if args.infile == '-':
1154 name = '<stdin>'
1155 source = sys.stdin.buffer.read()
1156 else:
1157 name = args.infile
1158 with open(args.infile, 'rb') as infile:
1159 source = infile.read()
1160 code = compile(source, name, "exec")
1161 dis(code, show_caches=args.show_caches, adaptive=args.specialized,
1162 show_offsets=args.show_offsets, show_positions=args.show_positions)
1163
1164if __name__ == "__main__":
1165 main()

Callers 1

dis.pyFile · 0.70

Calls 6

parse_argsMethod · 0.95
openFunction · 0.70
compileFunction · 0.70
disFunction · 0.70
add_argumentMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…