inspect.getsourcelines()
  • References/Python/Python/Runtime

inspect.getsourcelines(object) Return a list of source lines and starting line number for an object. The argument may be a module

2025-01-10 15:47:30
inspect.getcomments()
  • References/Python/Python/Runtime

inspect.getcomments(object) Return in a single string any lines of comments immediately preceding the object’s source code (for

2025-01-10 15:47:30
contextlib.closing()
  • References/Python/Python/Runtime

contextlib.closing(thing) Return a context manager that closes thing upon completion of the block. This is basically

2025-01-10 15:47:30
contextlib.redirect_stderr()
  • References/Python/Python/Runtime

contextlib.redirect_stderr(new_target) Similar to redirect_stdout() but redirecting

2025-01-10 15:47:30
sys.ps1
  • References/Python/Python/Runtime

sys.ps1 sys.ps2 Strings specifying the primary and secondary prompt of the interpreter. These are only defined if

2025-01-10 15:47:30
sys.modules
  • References/Python/Python/Runtime

sys.modules This is a dictionary that maps module names to modules which have already been loaded. This can be manipulated to

2025-01-10 15:47:30
inspect.signature()
  • References/Python/Python/Runtime

inspect.signature(callable, *, follow_wrapped=True) Return a Signature object for the given callable:

2025-01-10 15:47:30
sys.base_prefix
  • References/Python/Python/Runtime

sys.base_prefix Set during Python startup, before site.py is run, to the same value as prefix. If

2025-01-10 15:47:30
abc.ABC
  • References/Python/Python/Runtime

class abc.ABC A helper class that has ABCMeta as its metaclass. With this class, an abstract base class can be

2025-01-10 15:47:30
sys.flags
  • References/Python/Python/Runtime

sys.flags The struct sequence flags exposes the status of command line flags

2025-01-10 15:47:30