![]() u ¶įorce the binary layer of the stdout and stderr streams (which isĪvailable as their buffer attribute) to be unbuffered. Site.main() if you want them to be triggered). Manipulations if site is explicitly imported later (call Manipulations of sys.path that it entails. PEP 370 – Per user site-packages directory -S ¶ĭisable the import of the module site and the site-dependent Further restrictions may be imposed to prevent In isolated mode sys.path contains neither the script’s directory nor This can be useful to inspect global variables or a stack trace when a script ![]() Sys.stdin does not appear to be a terminal. When a script is passed as first argument or the -c option is used,Įnter interactive mode after executing the script or the command, even when PYTHONPATH and PYTHONHOME, that might be set. Ignore all PYTHON* environment variables, e.g. Turn on parser debugging output (for wizards only, depending on compilation Issue a warning when comparing str and bytes. Of directories and zipfiles that are passed to the interpreter as the This behaviour is deliberately similar to the handling Of a normal module, the interpreter will execute. Package names (including namespace packages) are also permitted. The implementation may not always enforce this (e.g. The module-name should be a valid Python module name, but Since the argument is a module name, you must not give a file extension Search sys.path for the named module and execute its contents as Sys.path (allowing modules in that directory to be imported as top "-c" and the current directory will be added to the start of If this option is given, the first element of sys.argv will be Statements separated by newlines, with significant leading whitespace as in ![]() In non-interactive mode, the entire input is parsed before it is executed.Īn interface option terminates the list of options consumed by the interpreter,Īll consecutive arguments will end up in sys.argv – note that the firstĮlement, subscript zero ( sys.argv), is a string reflecting the program’sĮxecute the Python code in command. Python module path and executed as a script. When called with -m module-name, the given module is located on the.Leading whitespace is significant in Python statements! Here command may contain multiple statements separated by When called with -c command, it executes the Python statement(s) given asĬommand.When called with a directory name argument, it reads and executes anĪppropriately named script from that directory.Reads and executes a script from that file. When called with a file name argument or with a file as standard input, it.Produce that with Ctrl-D on UNIX or Ctrl-Z, Enter on Windows) is read. When called with standard input connected to a tty device, it prompts forĬommands and executes them until an EOF (an end-of-file character, you can.The interpreter interface resembles that of the UNIX shell, but provides some
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |