inspect.getsourcelines(object) Return a list of source lines and starting line number for an object. The argument may be a module
inspect.getcomments(object) Return in a single string any lines of comments immediately preceding the object’s source code (for
contextlib.closing(thing) Return a context manager that closes thing upon completion of the block. This is basically
contextlib.redirect_stderr(new_target) Similar to redirect_stdout() but redirecting
sys.ps1 sys.ps2 Strings specifying the primary and secondary prompt of the interpreter. These are only defined if
sys.modules This is a dictionary that maps module names to modules which have already been loaded. This can be manipulated to
inspect.signature(callable, *, follow_wrapped=True) Return a Signature object for the given callable:
sys.base_prefix Set during Python startup, before site.py is run, to the same value as prefix. If
class abc.ABC A helper class that has ABCMeta as its metaclass. With this class, an abstract base class can be
sys.flags The struct sequence flags exposes the status of command line flags
Page 8 of 26