]> granicus.if.org Git - python/commitdiff
Issue #12602: Add missing cross-references to runpy and using/cmdline docs.
authorBerker Peksag <berker.peksag@gmail.com>
Wed, 10 Dec 2014 00:07:08 +0000 (02:07 +0200)
committerBerker Peksag <berker.peksag@gmail.com>
Wed, 10 Dec 2014 00:07:08 +0000 (02:07 +0200)
Patch by Éric Araujo.

Doc/library/runpy.rst
Doc/tutorial/interpreter.rst
Doc/using/cmdline.rst

index fc9e7c1488a8f2743cd401acb74d266bb80586e6..a08bc940e758cff7ae73e51a3cce2989ec6a7ba1 100644 (file)
@@ -72,6 +72,9 @@ The :mod:`runpy` module provides two functions:
    arguments. It is recommended that the :mod:`sys` module be left alone when
    invoking this function from threaded code.
 
+   .. seealso::
+      The :option:`-m` option offering equivalent functionality from the
+      command line.
 
    .. versionchanged:: 2.7
          Added ability to execute packages by looking for a ``__main__``
@@ -134,14 +137,18 @@ The :mod:`runpy` module provides two functions:
    limitations still apply, use of this function in threaded code should be
    either serialised with the import lock or delegated to a separate process.
 
+   .. seealso::
+      :ref:`using-on-interface-options` for equivalent functionality on the
+      command line (``python path/to/script``).
+
    .. versionadded:: 2.7
 
 .. seealso::
 
-   :pep:`338` - Executing modules as scripts
+   :pep:`338` -- Executing modules as scripts
       PEP written and implemented by Nick Coghlan.
 
-   :pep:`366` - Main module explicit relative imports
+   :pep:`366` -- Main module explicit relative imports
       PEP written and implemented by Nick Coghlan.
 
    :ref:`using-on-general` - CPython command line details
index 514c5f1986965cb1ce5c8d63f8f3c63c420ad485..19094f3e2ad0ef1d11d26d1ba20739c4501ae69a 100644 (file)
@@ -62,6 +62,8 @@ When a script file is used, it is sometimes useful to be able to run the script
 and enter interactive mode afterwards.  This can be done by passing :option:`-i`
 before the script.
 
+All command-line options are described in :ref:`using-on-general`.
+
 
 .. _tut-argpassing:
 
index b657f3f17c237e4b87a54c61d953c41df2e7d020..ce5e76fd4ceced5975bd96a4c52c4ba5d56035c6 100644 (file)
@@ -1,7 +1,7 @@
-.. highlightlang:: none
+.. highlightlang:: sh
 
 .. ATTENTION: You probably should update Misc/python.man, too, if you modify
-.. this file.
+   this file.
 
 .. _using-on-general:
 
@@ -130,6 +130,10 @@ source.
    ``"-"`` and the current directory will be added to the start of
    :data:`sys.path`.
 
+   .. seealso::
+      :func:`runpy.run_path`
+         Equivalent functionality directly available to Python code
+
 
 .. describe:: <script>