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.rst26
1 files changed, 26 insertions, 0 deletions
diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst
index b835f1e..1f773b7 100644
--- a/Doc/library/dis.rst
+++ b/Doc/library/dis.rst
@@ -63,6 +63,32 @@ 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] [-C] [infile]
+
+The following options are accepted:
+
+.. program:: dis
+
+.. cmdoption:: -h, --help
+
+ Display usage and exit.
+
+.. cmdoption:: -C, --show-caches
+
+ Show inline caches.
+
+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
-----------------