O'Reilly logo

Python Programming On Win32 by Mark Hammond, Andy Robinson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 -c command-line option to the interpreter, argv[0] is set to the string -c. If no script name is passed to the Python interpreter, argv has 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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required