summaryrefslogtreecommitdiffstats
path: root/Doc/library/inspect.rst
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2013-09-22 12:46:49 (GMT)
committerNick Coghlan <ncoghlan@gmail.com>2013-09-22 12:46:49 (GMT)
commitf94a16b494a2b21b8fcb90d666a31f6d78cabc26 (patch)
tree6c57e1aa09150175d484a45ae8351f0692cd04b3 /Doc/library/inspect.rst
parent4c7fe6a5add2d773ae3a85679d22414d8eafe66c (diff)
downloadcpython-f94a16b494a2b21b8fcb90d666a31f6d78cabc26.zip
cpython-f94a16b494a2b21b8fcb90d666a31f6d78cabc26.tar.gz
cpython-f94a16b494a2b21b8fcb90d666a31f6d78cabc26.tar.bz2
Close #18626: add a basic CLI for the inspect module
Diffstat (limited to 'Doc/library/inspect.rst')
-rw-r--r--Doc/library/inspect.rst17
1 files changed, 17 insertions, 0 deletions
diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst
index aabf85d..40e0158 100644
--- a/Doc/library/inspect.rst
+++ b/Doc/library/inspect.rst
@@ -1006,3 +1006,20 @@ updated as expected:
return an empty dictionary.
.. versionadded:: 3.3
+
+
+Command Line Interface
+----------------------
+
+The :mod:`inspect` module also provides a basic introspection capability
+from the command line.
+
+.. program:: inspect
+
+By default, accepts the name of a module and prints the source of that
+module. A class or function within the module can be printed instead by
+appended a colon and the qualified name of the target object.
+
+.. cmdoption:: --details
+
+ Print information about the specified object rather than the source code