sys._xoptions

sys._xoptions A dictionary of the various implementation-specific flags passed through the -X command-line option. Option names are either mapped to their values, if given explicitly, or to True. Example: $ ./python -Xa=b -Xc Python 3.2a3+ (py3k, Oct 16 2010, 20:14:50) [GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys._xoptions {'a': 'b', 'c': True} CPython implementation detail: This is a CPython-specific

sys._clear_type_cache()

sys._clear_type_cache() Clear the internal type cache. The type cache is used to speed up attribute and method lookups. Use the function only to drop unnecessary references during reference leak debugging. This function should be used for internal and specialized purposes only.

sys.version_info

sys.version_info A tuple containing the five components of the version number: major, minor, micro, releaselevel, and serial. All values except releaselevel are integers; the release level is 'alpha', 'beta', 'candidate', or 'final'. The version_info value corresponding to the Python version 2.0 is (2, 0, 0, 'final', 0). The components can also be accessed by name, so sys.version_info[0] is equivalent to sys.version_info.major and so on. Changed in version 3.1: Added named component attribu

sys.warnoptions

sys.warnoptions This is an implementation detail of the warnings framework; do not modify this value. Refer to the warnings module for more information on the warnings framework.

sys._current_frames()

sys._current_frames() Return a dictionary mapping each thread’s identifier to the topmost stack frame currently active in that thread at the time the function is called. Note that functions in the traceback module can build the call stack given such a frame. This is most useful for debugging deadlock: this function does not require the deadlocked threads’ cooperation, and such threads’ call stacks are frozen for as long as they remain deadlocked. The frame returned for a non-deadlocked threa

sys.winver

sys.winver The version number used to form registry keys on Windows platforms. This is stored as string resource 1000 in the Python DLL. The value is normally the first three characters of version. It is provided in the sys module for informational purposes; modifying this value has no effect on the registry keys used by Python. Availability: Windows.

sys.version

sys.version A string containing the version number of the Python interpreter plus additional information on the build number and compiler used. This string is displayed when the interactive interpreter is started. Do not extract version information out of it, rather, use version_info and the functions provided by the platform module.

sys.stdin

sys.stdin sys.stdout sys.stderr File objects used by the interpreter for standard input, output and errors: stdin is used for all interactive input (including calls to input()); stdout is used for the output of print() and expression statements and for the prompts of input(); The interpreter’s own prompts and its error messages go to stderr. These streams are regular text files like those returned by the open() function. Their parameters are chosen as follows: The character encoding is p

sys.tracebacklimit

sys.tracebacklimit When this variable is set to an integer value, it determines the maximum number of levels of traceback information printed when an unhandled exception occurs. The default is 1000. When set to 0 or less, all traceback information is suppressed and only the exception type and value are printed.

sys.thread_info

sys.thread_info A struct sequence holding information about the thread implementation. Attribute Explanation name Name of the thread implementation: 'nt': Windows threads 'pthread': POSIX threads 'solaris': Solaris threads lock Name of the lock implementation: 'semaphore': a lock uses a semaphore 'mutex+cond': a lock uses a mutex and a condition variable None if this information is unknown version Name and version of the thread library. It is a string, or None if these informatio