sys.getdefaultencoding()

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

sys.getcheckinterval()

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

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

sys.executable A string giving the absolute path of the executable binary for the Python interpreter, on systems where this makes sense. If Python is unable to retrieve the real path to its executable, sys.executable will be an empty string or None.

sys.exc_info()

sys.exc_info() This function returns a tuple of three values that give information about the exception that is currently being handled. The information returned is specific both to the current thread and to the current stack frame. If the current stack frame is not handling an exception, the information is taken from the calling stack frame, or its caller, and so on until a stack frame is found that is handling an exception. Here, “handling an exception” is defined as “executing an except cl