- What's new in Python {{ version }}?
+ What's new in Python {{ version }}?
changes since previous major release
- Tutorial
+ Tutorial
start here
- Using Python
+ Using Python
how to use Python on different platforms
- Language Reference
+ Language Reference
describes syntax and language elements
- Library Reference
+ Library Reference
keep this under your pillow
- Python HOWTOs
+ Python HOWTOs
in-depth documents on specific topics
|
- Extending and Embedding
+ Extending and Embedding
tutorial for C/C++ programmers
- Python/C API
+ Python/C API
reference for C/C++ programmers
- Installing Python Modules
+ Installing Python Modules
information for installers & sys-admins
- Distributing Python Modules
+ Distributing Python Modules
sharing modules with others
- Documenting Python
+ Documenting Python
guide for documentation authors
|
@@ -32,16 +32,16 @@
- Global Module Index
+ Global Module Index
quick access to all modules
- General Index
+ General Index
all functions, classes, terms
- Glossary
+ Glossary
the most important terms explained
|
- Search page
+ Search page
search this documentation
- Complete Table of Contents
+ Complete Table of Contents
lists all sections and subsections
|
diff --git a/Doc/using/cmdline.rst b/Doc/using/cmdline.rst
index a94c3e71c79..ca6126a5fbb 100644
--- a/Doc/using/cmdline.rst
+++ b/Doc/using/cmdline.rst
@@ -28,20 +28,25 @@ The most common use case is, of course, a simple invocation of a script::
python myscript.py
+.. _using-on-interface-options:
+
Interface options
~~~~~~~~~~~~~~~~~
-The interpreter interface resembles that of the UNIX shell:
+The interpreter interface resembles that of the UNIX shell, but provides some
+additional methods of invocation:
* When called with standard input connected to a tty device, it prompts for
commands and executes them until an EOF (an end-of-file character, you can
produce that with *Ctrl-D* on UNIX or *Ctrl-Z, Enter* on Windows) is read.
* When called with a file name argument or with a file as standard input, it
reads and executes a script from that file.
+* When called with a directory name argument, it reads and executes an
+ appropriately named script from that directory.
* When called with ``-c command``, it executes the Python statement(s) given as
*command*. Here *command* may contain multiple statements separated by
newlines. Leading whitespace is significant in Python statements!
-* When called with ``-m module-name``, the given module is searched on the
+* When called with ``-m module-name``, the given module is located on the
Python module path and executed as a script.
In non-interactive mode, the entire input is parsed before it is executed.
@@ -58,25 +63,31 @@ source.
normal module code.
If this option is given, the first element of :data:`sys.argv` will be
- ``"-c"``.
+ ``"-c"`` and the current directory will be added to the start of
+ :data:`sys.path` (allowing modules in that directory to be imported as top
+ level modules).
.. cmdoption:: -m