MCPcopy Index your code
hub / github.com/RustPython/RustPython / main

Function main

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

Source from the content-addressed store, hash-verified

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