This module provides an interface to the optional garbage collector. It provides the ability to disable the collector, tune the collection frequency, and set debugging options. It also provides acc...| Python documentation
The “Python library” contains several different kinds of components. It contains data types that would normally be considered part of the “core” of a language, such as numbers and lists. For these ...| Python documentation
Source code: Lib/traceback.py This module provides a standard interface to extract, format and print stack traces of Python programs. It is more flexible than the interpreter’s default traceback di...| Python documentation
The Python Development Mode introduces additional runtime checks that are too expensive to be enabled by default. It should not be more verbose than the default if the code is correct; new warnings...| Python documentation
Build Requirements: Features and minimum versions required to build CPython: A C11 compiler. Optional C11 features are not required., On Windows, Microsoft Visual Studio 2017 or later is required.,...| Python documentation
The Application Programmer’s Interface to Python gives C and C++ programmers access to the Python interpreter at a variety of levels. The API is equally usable from C++, but for brevity it is gener...| Python documentation
Source code: Lib/threading.py This module constructs higher-level threading interfaces on top of the lower level_thread module. CPython implementation detail: In CPython, due to the Global Interpre...| Python documentation
Source code: Lib/importlib/__init__.py Introduction: The purpose of the importlib package is three-fold. One is to provide the implementation of the import statement (and thus, by extension, the__i...| Python documentation
Historically, Python uses the ANSI APIs for interacting with the Windows operating system, often via C Runtime functions. However, these have been long discouraged in favor of the UTF-16 APIs. Within the operating system, all text is represented as UTF-...| Python Enhancement Proposals (PEPs)
Source code: Lib/dis.py The dis module supports the analysis of CPython bytecode by disassembling it. The CPython bytecode which this module takes as an input is defined in the file Include/opcode....| Python documentation
System Functions: These are utility functions that make functionality from the sys module accessible to C code. They all work with the current interpreter thread’s sys module’s dict, which is conta...| Python documentation
Python can be initialized with Py_InitializeFromConfig() and the PyConfig structure. It can be preinitialized with Py_PreInitialize() and the PyPreConfig structure. There are two kinds of configura...| Python documentation
Source code: Lib/warnings.py Warning messages are typically issued in situations where it is useful to alert the user of some condition in a program, where that condition (normally) doesn’t warrant...| Python documentation
Source code: Lib/io.py Overview: The io module provides Python’s main facilities for dealing with various types of I/O. There are three main types of I/O: text I/O, binary I/O and raw I/O. These ar...| Python documentation
Source code: Lib/ctypes ctypes is a foreign function library for Python. It provides C compatible data types, and allows calling functions in DLLs or shared libraries. It can be used to wrap these ...| Python documentation
Source code: Lib/site.py This module is automatically imported during initialization. The automatic import can be suppressed using the interpreter’s-S option. Importing this module normally appends...| Python documentation
The CPython interpreter scans the command line and the environment for various settings. CPython implementation detail: Other implementations’ command line schemes may differ. See Alternate Impleme...| Python documentation
A small number of constants live in the built-in namespace. They are: Constants added by the site module: The site module (which is imported automatically during startup, except if the-S command-li...| Python documentation
Invoking the Interpreter: The Python interpreter is usually installed as/usr/local/bin/python3.13 on those machines where it is available; putting/usr/local/bin in your Unix shell’s search path mak...| Python documentation
PEP 492 introduced support for native coroutines and async/await syntax to Python 3.5. It is proposed here to extend Python’s asynchronous capabilities by adding support for asynchronous generators.| Python Enhancement Proposals (PEPs)
Source code: Lib/collections/__init__.py This module implements specialized container datatypes providing alternatives to Python’s general purpose built-in containers, dict, list, set, and tuple.,,...| Python documentation
This PEP proposes to add a new set of import hooks that offer better customization of the Python import mechanism. Contrary to the current __import__ hook, a new-style hook can be injected into the existing scheme, allowing for a finer grained control ...| Python Enhancement Proposals (PEPs)
Compound statements contain (groups of) other statements; they affect or control the execution of those other statements in some way. In general, compound statements span multiple lines, although i...| Python documentation
Source code: Lib/os.py This module provides a portable way of using operating system dependent functionality. If you just want to read or write a file see open(), if you want to manipulate paths, s...| Python documentation
Source code: Lib/profile.py and Lib/pstats.py Introduction to the profilers: cProfile and profile provide deterministic profiling of Python programs. A profile is a set of statistics that describes...| Python documentation
See Python Initialization Configuration for details on how to configure the interpreter prior to initialization. Before Python Initialization: In an application embedding Python, the Py_Initialize(...| Python documentation
This module provides access to the mathematical functions defined by the C standard. These functions cannot be used with complex numbers; use the functions of the same name from the cmath module if...| Python documentation
Source code: Lib/venv/ The venv module supports creating lightweight “virtual environments”, each with their own independent set of Python packages installed in their site directories. A virtual en...| Python documentation
Objects, values and types: Objects are Python’s abstraction for data. All data in a Python program is represented by objects or by relations between objects. (In a sense, and in conformance to Von ...| Python documentation
Source code: Lib/pdb.py The module pdb defines an interactive source code debugger for Python programs. It supports setting (conditional) breakpoints and single stepping at the source line level, i...| Python documentation