We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9fb7070 commit cc3445eCopy full SHA for cc3445e
Lib/dis.py
@@ -1 +1,12 @@
1
-from _dis import *
+import argparse
2
+import _dis
3
+
4
5
+# Disassembling a file by following cpython Lib/dis.py
6
+parser = argparse.ArgumentParser()
7
+parser.add_argument('infile', type=argparse.FileType('rb'), nargs='?', default='-')
8
+args = parser.parse_args()
9
+with args.infile as infile:
10
+ source = infile.read()
11
+code = compile(source, args.infile.name, "exec")
12
+_dis.dis(code)
0 commit comments