sys.getdefaultencoding()

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

sys.getallocatedblocks()

sys.getallocatedblocks() Return the number of memory blocks currently allocated by the interpreter, regardless of their size. This function is mainly useful for tracking and debugging memory leaks. Because of the interpreter’s internal caches, the result can vary from call to call; you may have to call _clear_type_cache() and gc.collect() to get more predictable results. If a Python build or implementation cannot reasonably compute this information, getallocatedblocks() is allowed to return

sys.getcheckinterval()

sys.getcheckinterval() Return the interpreter’s “check interval”; see setcheckinterval(). Deprecated since version 3.2: Use getswitchinterval() instead.

sys.exec_prefix

sys.exec_prefix A string giving the site-specific directory prefix where the platform-dependent Python files are installed; by default, this is also '/usr/local'. This can be set at build time with the --exec-prefix argument to the configure script. Specifically, all configuration files (e.g. the pyconfig.h header file) are installed in the directory exec_prefix/lib/pythonX.Y/config, and shared library modules are installed in exec_prefix/lib/pythonX.Y/lib-dynload, where X.Y is the version n

sys.float_repr_style

sys.float_repr_style A string indicating how the repr() function behaves for floats. If the string has value 'short' then for a finite float x, repr(x) aims to produce a short string with the property that float(repr(x)) == x. This is the usual behaviour in Python 3.1 and later. Otherwise, float_repr_style has value 'legacy' and repr(x) behaves in the same way as it did in versions of Python prior to 3.1. New in version 3.1.

sys.exit()

sys.exit([arg]) Exit from Python. This is implemented by raising the SystemExit exception, so cleanup actions specified by finally clauses of try statements are honored, and it is possible to intercept the exit attempt at an outer level. The optional argument arg can be an integer giving the exit status (defaulting to zero), or another type of object. If it is an integer, zero is considered “successful termination” and any nonzero value is considered “abnormal termination” by shells and the

sys.float_info

sys.float_info A struct sequence holding information about the float type. It contains low level information about the precision and internal representation. The values correspond to the various floating-point constants defined in the standard header file float.h for the ‘C’ programming language; see section 5.2.4.2.2 of the 1999 ISO/IEC C standard [C99], ‘Characteristics of floating types’, for details. attribute float.h macro explanation epsilon DBL_EPSILON difference between 1 and the lea

sys.flags

sys.flags The struct sequence flags exposes the status of command line flags. The attributes are read only. attribute flag debug -d inspect -i interactive -i optimize -O or -OO dont_write_bytecode -B no_user_site -s no_site -S ignore_environment -E verbose -v bytes_warning -b quiet -q hash_randomization -R Changed in version 3.2: Added quiet attribute for the new -q flag. New in version 3.2.3: The hash_randomization attribute. Changed in version 3.3: Removed obsolete division_warnin

sys.dont_write_bytecode

sys.dont_write_bytecode If this is true, Python won’t try to write .pyc files on the import of source modules. This value is initially set to True or False depending on the -B command line option and the PYTHONDONTWRITEBYTECODE environment variable, but you can set it yourself to control bytecode file generation.

sys.excepthook()

sys.excepthook(type, value, traceback) This function prints out a given traceback and exception to sys.stderr. When an exception is raised and uncaught, the interpreter calls sys.excepthook with three arguments, the exception class, exception instance, and a traceback object. In an interactive session this happens just before control is returned to the prompt; in a Python program this happens just before the program exits. The handling of such top-level exceptions can be customized by assign