summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1991-06-07 14:31:11 (GMT)
committerGuido van Rossum <guido@python.org>1991-06-07 14:31:11 (GMT)
commitdd0108081b1a4b44d712477308b9764139ebc6a2 (patch)
tree9e54b02e6f87fce3b1056629d49d1304696db94a /Doc
parent689e701919e542803f71a1464e6bf7548f0fd4b7 (diff)
downloadcpython-dd0108081b1a4b44d712477308b9764139ebc6a2.zip
cpython-dd0108081b1a4b44d712477308b9764139ebc6a2.tar.gz
cpython-dd0108081b1a4b44d712477308b9764139ebc6a2.tar.bz2
Mention "-c command" option.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/tut.tex8
-rw-r--r--Doc/tut/tut.tex8
2 files changed, 12 insertions, 4 deletions
diff --git a/Doc/tut.tex b/Doc/tut.tex
index ee3e47d..6a4767d 100644
--- a/Doc/tut.tex
+++ b/Doc/tut.tex
@@ -169,12 +169,16 @@ from that file.%
you want) they are satisfied from whatever file or device is
connected to standard input of the Python interpreter.
}
-If available, the script name and additional arguments thereafter are
+A third possibility is ``{\tt python -c command [arg] ...}'', which
+executes the statement(s) in {\tt command}, in analogy of the shell's
+{\tt -c} option.
+When available, the script name and additional arguments thereafter are
passed to the script in the variable
{\tt sys.argv},
which is a list of strings.
+When {\tt -c command} is used, {\tt sys.argv} is set to {\tt '-c'}.
-When standard input is a tty, the interpreter is said to be in
+When commands are read from a tty, the interpreter is said to be in
{\em interactive\ mode}.
In this mode it prompts for the next command with the
{\em primary\ prompt},
diff --git a/Doc/tut/tut.tex b/Doc/tut/tut.tex
index ee3e47d..6a4767d 100644
--- a/Doc/tut/tut.tex
+++ b/Doc/tut/tut.tex
@@ -169,12 +169,16 @@ from that file.%
you want) they are satisfied from whatever file or device is
connected to standard input of the Python interpreter.
}
-If available, the script name and additional arguments thereafter are
+A third possibility is ``{\tt python -c command [arg] ...}'', which
+executes the statement(s) in {\tt command}, in analogy of the shell's
+{\tt -c} option.
+When available, the script name and additional arguments thereafter are
passed to the script in the variable
{\tt sys.argv},
which is a list of strings.
+When {\tt -c command} is used, {\tt sys.argv} is set to {\tt '-c'}.
-When standard input is a tty, the interpreter is said to be in
+When commands are read from a tty, the interpreter is said to be in
{\em interactive\ mode}.
In this mode it prompts for the next command with the
{\em primary\ prompt},