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 objectsannotationlib
--- Functionality for introspecting annotationssite
--- Site-specific configuration hook
也參考
See the
concurrent.interpreters
module, which similarly exposes core runtime functionality.