summaryrefslogtreecommitdiffstats
path: root/Doc/library/dis.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library/dis.rst')
-rw-r--r--Doc/library/dis.rst22
1 files changed, 22 insertions, 0 deletions
diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst
index b559b08..ef016c1 100644
--- a/Doc/library/dis.rst
+++ b/Doc/library/dis.rst
@@ -63,6 +63,28 @@ the following command can be used to display the disassembly of
(The "2" is a line number).
+.. _dis-cli:
+
+Command-line interface
+----------------------
+
+The :mod:`dis` module can be invoked as a script from the command line:
+
+.. code-block:: sh
+
+ python -m dis [-h] [infile]
+
+The following options are accepted:
+
+.. program:: dis
+
+.. cmdoption:: -h, --help
+
+ Display usage and exit.
+
+If :file:`infile` is specified, its disassembled code will be written to stdout.
+Otherwise, disassembly is performed on compiled source code recieved from stdin.
+
Bytecode analysis
-----------------