File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -169,12 +169,16 @@ \section{Using the Python Interpreter}
169169 you want) they are satisfied from whatever file or device is
170170 connected to standard input of the Python interpreter.
171171}
172- If available, the script name and additional arguments thereafter are
172+ A third possibility is `` {\tt python -c command [arg] ...}'' , which
173+ executes the statement(s) in {\tt command}, in analogy of the shell's
174+ {\tt -c} option.
175+ When available, the script name and additional arguments thereafter are
173176passed to the script in the variable
174177{\tt sys.argv},
175178which is a list of strings.
179+ When {\tt -c command} is used, {\tt sys.argv} is set to {\tt '-c' }.
176180
177- When standard input is a tty, the interpreter is said to be in
181+ When commands are read from a tty, the interpreter is said to be in
178182{\em interactive\ mode}.
179183In this mode it prompts for the next command with the
180184{\em primary\ prompt},
Original file line number Diff line number Diff line change @@ -169,12 +169,16 @@ \section{Using the Python Interpreter}
169169 you want) they are satisfied from whatever file or device is
170170 connected to standard input of the Python interpreter.
171171}
172- If available, the script name and additional arguments thereafter are
172+ A third possibility is `` {\tt python -c command [arg] ...}'' , which
173+ executes the statement(s) in {\tt command}, in analogy of the shell's
174+ {\tt -c} option.
175+ When available, the script name and additional arguments thereafter are
173176passed to the script in the variable
174177{\tt sys.argv},
175178which is a list of strings.
179+ When {\tt -c command} is used, {\tt sys.argv} is set to {\tt '-c' }.
176180
177- When standard input is a tty, the interpreter is said to be in
181+ When commands are read from a tty, the interpreter is said to be in
178182{\em interactive\ mode}.
179183In this mode it prompts for the next command with the
180184{\em primary\ prompt},
You can’t perform that action at this time.
0 commit comments