sys

The sys module contains variables and functions that pertain to the operation of the interpreter and its environment. The following variables are defined:

api_version

An integer representing the C API version of the Python interpreter. Used when working with extension modules.

argv

List of command-line options passed to a program. argv[0] is the name of the program.

builtin_module_names

Tuple containing names of modules built into the Python executable.

byteorder

Native byte-ordering of the machine—’little’ for little-endian or ‘big’ for big-endian.

copyright

String containing copyright message.

__displayhook__

Original value of the displayhook() function.

__excepthook__

Original value of the excepthook() function.

dllhandle

Integer handle ...

Get Python: Essential Reference, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.