Python sys Functions

EditRocket provides the following information on sys functions in the Python source code builder.

_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.

_getframe([depth]) - Return a frame object from the call stack.

- The C API version for this interpreter.

- The list of command line arguments passed to a Python script.

- A tuple of strings giving the names of all modules that are compiled into this Python interpreter.

- An indicator of the native byte order.

- A string containing the copyright pertaining to the Python interpreter.

displayhook(value) - If value is not None, this function prints it to sys.stdout, and saves it in __builtin__._.

- Integer specifying the handle of the Python DLL.

exc_clear() - This function clears all information relating to the current or last exception that occurred in the current thread.

exc_info() - This function returns a tuple of three values that give information about the exception that is currently being handled.

excepthook(type, value, traceback) - This function prints out a given traceback and exception to sys.stderr.

- A string giving the site-specific directory prefix where the platform-dependent Python files are installed.

- A string giving the name of the executable binary for the Python interpreter, on systems where this makes sense.

exit([arg]) - Exit from Python.

- This function will be called when the interpreter exits.

getcheckinterval() - Return the interpreter's ``check interval''.

getdefaultencoding() - Return the name of the current default string encoding used by the Unicode implementation.

getdlopenflags() - Return the current value of the flags that are used for dlopen() calls.

getfilesystemencoding() - Return the name of the encoding used to convert Unicode filenames into system file names, or None if the system default encoding is used.

getrecursionlimit() - Return the current value of the recursion limit, the maximum depth of the Python interpreter stack.

getrefcount(object) - Return the reference count of the object.

getwindowsversion() - Return a tuple containing five components, describing the Windows version currently running.

- The version number encoded as a single integer.

- The largest positive integer supported by Python's regular integer type.

- An integer giving the largest supported code point for a Unicode character.

- This is a dictionary that maps module names to modules which have already been loaded.

- A list of strings that specifies the search path for modules.

- This string contains a platform identifier.

- A string giving the site-specific directory prefix where the platform independent Python files are installed.

- The primary prompt of the interpreter.

- The secondary prompt of the interpreter

setcheckinterval(interval) - Set the interpreter's ``check interval''.

setdefaultencoding(name) - Set the current default string encoding used by the Unicode implementation.

setdlopenflags(n) - Set the flags used by the interpreter for dlopen() calls.

setprofile(profilefunc) - Set the system's profile function, which allows you to implement a Python source code profiler in Python.

setrecursionlimit(limit) - Set the maximum depth of the Python interpreter stack to limit.

settrace(tracefunc) - Set the system's trace function, which allows you to implement a Python source code debugger in Python.

settscdump(on_flag) - Activate dumping of VM measurements using the Pentium timestamp counter, if on_flag is true. Deactivate these dumps if on_flag is off.

- standard error stream

- standard input stream

- standard output stream

- A triple (repo, branch, version) representing the Subversion information of the Python interpreter.

- Determines the maximum number of levels of traceback information printed when an unhandled exception occurs.

- A string containing the version number of the Python interpreter plus additional information on the build number and compiler used.

- A tuple containing the five components of the version number: major, minor, micro, releaselevel, and serial.

- This is an implementation detail of the warnings framework; do not modify this value.

- The version number used to form registry keys on Windows platforms.