sys.ps2 Strings specifying the primary and secondary prompt of the interpreter. These are only defined if the interpreter is
format(*, chain=True) Format the exception. If chain is not True, __cause__
inspect.getsourcefile(object) Return the name of the Python source file in which an object was defined. This will fail with
traceback.format_exc(limit=None, chain=True) This is like print_exc(limit) but returns a string instead of printing
sysconfig.get_platform() Return a string that identifies the current platform. This is used
sys.argv The list of command line arguments passed to a Python script. argv[0] is the script name (it is operating
site.getusersitepackages() Return the path of the user-specific site-packages directory, USER_SITE. If it is not
inspect.getinnerframes(traceback, context=1) Get a list of frame records for a traceback’s frame and all inner frames. These
sys._current_frames() Return a dictionary mapping each thread’s identifier to the topmost stack frame currently active in that
sys._clear_type_cache() Clear the internal type cache. The type cache is used to speed up attribute and method lookups. Use
Page 10 of 26