Python Runtime Services¶
The modules described in this chapter provide a wide range of services related to the Python interpreter and its interaction with its environment. Here’s an overview:
sys— System-specific parameters and functionssys.monitoring— Execution event monitoringsysconfig— Provide access to Python’s configuration informationbuiltins— Built-in objects__main__— Top-level code environmentwarnings— Warning controldataclasses— Data Classescontextlib— Utilities forwith-statement contextsabc— Abstract Base Classesatexit— Exit handlerstraceback— Print or retrieve a stack traceback__future__— Future statement definitionsgc— Garbage Collector interfaceinspect— Inspect live objects- Types and members
- Retrieving source code
- Introspecting callables with the Signature object
- Classes and functions
- The interpreter stack
- Fetching attributes statically
- Current State of Generators, Coroutines, and Asynchronous Generators
- Code Objects Bit Flags
- Buffer flags
- Interfejs wiersza komenda komendy
annotationlib— Functionality for introspecting annotationssite— Site-specific configuration hook
Zobacz także
See the
concurrent.interpretersmodule, which similarly exposes core runtime functionality.