"Interpreter Start Mode"
The first way to start the interpreter is similar to starting the Unix shell, which interactively reads and executes each command when it is started by the standard input stream of the TTY device to which it is connected, and reads and executes the script from the file when the interpreter starts with a filename or a standard file input stream.
The second way to start the interpreter is to enter PYTHON–C command [ARG] ..., where command is one or more statements executed. Because Python expressions contain a variety of special characters, such as spaces, it is recommended to use a single quote string to represent the command.
Python can execute the module as a source file, using python–m module [ARG] ... to execute the files in the module.
"How to exit the interpreter"
The Python interpreter identifies both the Windows system and the UNIX system with the input control-d and control-z characters as the end of the script file run, with 0 as the state at which the script ends. You can use the Quit () function to leave the interpreter out of the currently running script when the input end-of-identity does not work.
"Parameters of the Interpreter"
The interpreter can get the file name and running parameters of the script to be run, both of which are saved to the string list argv variable. The argv module can be accessed by using the Import SYS command in the SYS module. SYS.ARGV[0] is generally the script file name, if the script file name to the interpreter is '-' (indicates the standard input stream), Sys.argv[0] is set to '-'; When using '-C ' as the interpreter starts the way, Sys.argv[0] is set to '-C '; '-M ' to start the module, Sys.argv[0] is set to the local path full name of the module.
"Format of script file"
UTF-8
Introduction to the interpreter for the introductory Python chapter