26. Python Runtime Services

The modules described in this chapter provide a wide range of services related to the Python interpreter and its interaction with its environment. Here's an overview:

sys   Access system-specific parameters and functions.
__builtin__   The module that provides the built-in namespace.
__main__   The environment where the top-level script is run.
warnings   Issue warning messages and control their disposition.
contextlib   Utilities for with-statement contexts.
atexit   Register and execute cleanup functions.
traceback   Print or retrieve a stack traceback.
__future__   Future statement definitions
gc   Interface to the cycle-detecting garbage collector.
inspect   Extract information and source code from live objects.
site   A standard way to reference site-specific modules.
user   A standard way to reference user-specific modules.
fpectl   Provide control for floating point exception handling.

See About this document... for information on suggesting changes.