module sys: System-Specific Parameters and Functions
This module is always available and provides access to some variables used or maintained by the interpreter and to functions that interact strongly with the interpreter.
-
argv The list of command-line arguments passed to a Python script.
argv[0]is the script name (it’s operating system-dependent, whether this is a full pathname or not). If the command is executed using the-ccommand-line option to the interpreter,argv[0]is set to the string-c. If no script name is passed to the Python interpreter,argvhas zero length.-
builtin_module_names A tuple of strings giving the names of all modules that are compiled into this Python interpreter. (This information isn’t available in any other way:
modules.keys()lists only the imported modules.)-
copyright A string containing the copyright pertaining to the Python interpreter.
-
exc_info() Returns a tuple of three values that give information about the exception that’s currently being handled. The information returned is specific both to the current thread and to the current stack frame. If the current stack frame is not handling an exception, the information is taken from the calling stack frame, or its caller, and so on until a stack frame is found that is handling an exception. Here, handling an exception is defined as executing or having executed an except clause. For any stack frame, only information about the most recently handled exception is accessible.
If no exception is being ...