Source code: Lib/platform.py Cross platform: Java platform: Windows platform: macOS platform: iOS platform: Unix platforms: Linux platforms: Android platform: Command-line usage: platform can also ...| Python documentation
Perhaps one of the most important structures of the Python object system is the structure that defines a new type: the PyTypeObject structure. Type objects can be handled using any of the PyObject_...| Python documentation
Initializing C modules: Modules objects are usually created from extension modules (shared libraries which export an initialization function), or compiled-in modules (where the initialization funct...| Python documentation
CPython supports two different calling protocols: tp_call and vectorcall. The tp_call Protocol: Instances of classes that set tp_call are callable. The signature of the slot is: A call is made usin...| Python documentation
Source code: Lib/textwrap.py The textwrap module provides some convenience functions, as well as TextWrapper, the class that does all the work. If you’re just wrapping or filling one or two text st...| Python documentation
Source code: Lib/fileinput.py This module implements a helper class and functions to quickly write a loop over standard input or a list of files. If you just want to read or write one file see open...| Python documentation
Python 2.7.18 documentation| docs.python.org
28.2. sysconfig — Provide access to Python’s configuration information¶| docs.python.org
17.2. socket — Low-level networking interface¶| docs.python.org
Interactive Mode: There are two variants of the interactive REPL. The classic basic interpreter is supported on all platforms with minimal line control capabilities. On Windows, or Unix-like system...| Python documentation
Source code: Lib/runpy.py The runpy module is used to locate and run Python modules without importing them first. Its main use is to implement the-m command line switch that allows scripts to be lo...| Python documentation
This part of the documentation is devoted to general information on the setup of the Python environment on different platforms, the invocation of the interpreter and things that make working with P...| Python documentation
Source code: Lib/shlex.py The shlex class makes it easy to write lexical analyzers for simple syntaxes resembling that of the Unix shell. This will often be useful for writing minilanguages, (for e...| Python documentation
Source code: Lib/keyword.py This module allows a Python program to determine if a string is a keyword or soft keyword.| Python documentation
5. Creating Built Distributions¶| docs.python.org
Source code: Lib/pkgutil.py This module provides utilities for the import system, in particular package support.| Python documentation
In Python, all exceptions must be instances of a class that derives from BaseException. In a try statement with an except clause that mentions a particular class, that clause also handles any excep...| Python documentation
Source code: Lib/bisect.py This module provides support for maintaining a list in sorted order without having to sort the list after each insertion. For long lists of items with expensive compariso...| Python documentation
This section describes the low-level protocol that enables external tools to inject and execute a Python script within a running CPython process. This mechanism forms the basis of the sys.remote_ex...| Python documentation
Starting with the 3.13 release, CPython has experimental support for running with the global interpreter lock(GIL) disabled in a configuration called free threading. This document describes how to ...| Python documentation
This reference manual describes the syntax and “core semantics” of the language. It is terse, but attempts to be exact and complete. The semantics of non-essential built-in object types and of the ...| Python documentation
Source code: Lib/weakref.py The weakref module allows the Python programmer to create weak references to objects. In the following, the term referent means the object which is referred to by a weak...| Python documentation
Source code: Lib/http/client.py This module defines classes that implement the client side of the HTTP and HTTPS protocols. It is normally not used directly — the module urllib.request uses it to h...| Python documentation
Source code: Lib/zipfile/ The ZIP file format is a common archive and compression standard. This module provides tools to create, read, write, append, and list a ZIP file. Any advanced use of this ...| Python documentation
Unicode Objects: Since the implementation of PEP 393 in Python 3.3, Unicode objects internally use a variety of representations, in order to allow handling the complete range of Unicode characters ...| Python documentation
23.2.1. shlex Objects¶| docs.python.org
1.1.1. Interface options¶| docs.python.org
22.2. locale — Internationalization services¶| docs.python.org
8.1.3. date Objects¶| docs.python.org
8.2. calendar — General calendar-related functions¶| docs.python.org
The Formatter class has the following public methods:| docs.python.org
The Python Tutorial¶| docs.python.org
The Python Standard Library¶| docs.python.org
difflib — Helpers for computing deltas¶| docs.python.org
Source code: Lib/email/contentmanager.py Content Manager Instances: Currently the email package provides only one concrete content manager, raw_data_manager, although more may be added in the futur...| Python documentation
Source code: Lib/mailbox.py This module defines two classes, Mailbox and Message, for accessing and manipulating on-disk mailboxes and the messages they contain. Mailbox offers a dictionary-like ma...| Python documentation
Source code: Lib/email/mime/ This module is part of the legacy ( Compat32) email API. Its functionality is partially replaced by the contentmanager in the new API, but in certain applications these...| Python documentation
Source code: Lib/email/__init__.py The email package is a library for managing email messages. It is specifically not designed to do any sending of email messages to SMTP ( RFC 2821), NNTP, or othe...| Python documentation
Source code: Lib/email/headerregistry.py Headers are represented by customized subclasses of str. The particular class used to represent a given header is determined by the header_factory of the po...| Python documentation
Source code: Lib/asyncio/subprocess.py, Lib/asyncio/base_subprocess.py This section describes high-level async/await asyncio APIs to create and manage subprocesses. Here’s an example of how asyncio...| Python documentation
Editor, Hugo van Kemenade,. This article explains the new features in Python 3.14, compared to 3.13. For full details, see the changelog. Summary – release highlights: Python 3.14 beta is the pre-r...| Python documentation
This article explains the new features in Python 3.3, compared to 3.2. Python 3.3 was released on September 29, 2012. For full details, see the changelog. Summary – Release highlights: New syntax f...| Python documentation
Creating Heap-Allocated Types: The following functions and structs are used to create heap types.| Python documentation
The functions and macros in this section are used for managing reference counts of Python objects.| Python documentation
Source code: Lib/operator.py The operator module exports a set of efficient functions corresponding to the intrinsic operators of Python. For example, operator.add(x, y) is equivalent to the expres...| Python documentation
15.1.1. Process Parameters¶| docs.python.org
15.16. errno — Standard errno system symbols¶| docs.python.org
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
Starting with the 3.13 release, CPython has experimental support for a build of Python called free threading where the global interpreter lock(GIL) is disabled. Free-threaded execution allows for f...| Python documentation
Overview: Memory management in Python involves a private heap containing all Python objects and data structures. The management of this private heap is ensured internally by the Python memory manag...| Python documentation
Source code: Lib/shelve.py A “shelf” is a persistent, dictionary-like object. The difference with “dbm” databases is that the values (not the keys!) in a shelf can be essentially arbitrary Python o...| Python documentation
Source code: Lib/asyncio/exceptions.py| 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/email/utils.py There are a couple of useful utilities provided in the email.utils module: The remaining functions are part of the legacy ( Compat32) email API. There is no need to ...| Python documentation
Source code: Lib/email/parser.py Message object structures can be created in one of two ways: they can be created from whole cloth by creating an EmailMessage object, adding headers using the dicti...| Python documentation
Source code: Lib/email/message.py The central class in the email package is the EmailMessage class, imported from the email.message module. It is the base class for the email object model. EmailMes...| Python documentation
Source code: Lib/email/header.py This module is part of the legacy ( Compat32) email API. In the current API encoding and decoding of headers is handled transparently by the dictionary-like API of ...| Python documentation
Source code: Lib/email/generator.py One of the most common tasks is to generate the flat (serialized) version of the email message represented by a message object structure. You will need to do thi...| Python documentation
Source code: Lib/email/errors.py The following exception classes are defined in the email.errors module: Here is the list of the defects that the FeedParser can find while parsing messages. Note th...| Python documentation
Source code: Lib/email/charset.py This module is part of the legacy ( Compat32) email API. In the new API only the aliases table is used. The remaining text in this section is the original document...| Python documentation
Source code: Lib/ipaddress.py ipaddress provides the capabilities to create, manipulate and operate on IPv4 and IPv6 addresses and networks. The functions and classes in this module make it straigh...| Python documentation
There are several ways to present the output of a program; data can be printed in a human-readable form, or written to a file for future use. This chapter will discuss some of the possibilities. Fa...| Python documentation
7. Compound statements¶| docs.python.org
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
Source code: Lib/getopt.py This module helps scripts to parse the command line arguments in sys.argv. It supports the same conventions as the Unix getopt() function (including the special meanings ...| 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
5.2. Atoms¶| docs.python.org
The first version requires that numerator and denominator are instances| docs.python.org
9.4.1. Quick-start Tutorial¶| docs.python.org
>>>The default Python prompt of the interactive shell. Often seen for code| docs.python.org
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/numbers.py The numbers module ( PEP 3141) defines a hierarchy of numeric abstract base classes which progressively define more operations. None of the types defined in this module ...| Python documentation
Source code: Lib/logging/handlers.py Important: This page contains only reference information. For tutorials, please see Basic Tutorial, Advanced Tutorial, Logging Cookbook. The following useful ha...| Python documentation
Source code: Lib/ssl.py This module provides access to Transport Layer Security (often known as “Secure Sockets Layer”) encryption and peer authentication facilities for network sockets, both clien...| Python documentation
Source code: Lib/email/policy.py The email package’s prime focus is the handling of email messages as described by the various email and MIME RFCs. However, the general format of email messages (a ...| Python documentation
The Message class is very similar to the EmailMessage class, without the methods added by that class, and with the default behavior of certain other methods being slightly different. We also docume...| Python documentation
2. Built-in Functions¶| docs.python.org
4. Built-in Constants¶| docs.python.org
In Python, the special name__main__ is used for two important constructs: the name of the top-level environment of the program, which can be checked using the__name__ == '__main__' expression; and,...| Python documentation
Source code: Lib/configparser.py This module provides the ConfigParser class which implements a basic configuration language which provides a structure similar to what’s found in Microsoft Windows ...| Python documentation
This module contains functions to dump Python tracebacks explicitly, on a fault, after a timeout, or on a user signal. Call faulthandler.enable() to install fault handlers for the SIGSEGV, SIGFPE, ...| 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/smtplib.py The smtplib module defines an SMTP client session object that can be used to send mail to any internet machine with an SMTP or ESMTP listener daemon. For details of SMTP...| Python documentation
This section outlines high-level asyncio APIs to work with coroutines and Tasks. Coroutines, Awaitables, Creating Tasks, Task Cancellation, Task Groups, Sleeping, Running Tasks Concurrently, Eager ...| Python documentation
Author, A.M. Kuchling,. This article explains the new features in Python 2.5. The final release of Python 2.5 is scheduled for August 2006; PEP 356 describes the planned release schedule. Python 2....| Python documentation
Source code: Lib/tarfile.py The tarfile module makes it possible to read and write tar archives, including those using gzip, bz2 and lzma compression. Use the zipfile module to read or write.zip fi...| 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
Source code: Lib/xml/etree/ElementTree.py The xml.etree.ElementTree module implements a simple and efficient API for parsing and creating XML data. Tutorial: This is a short tutorial for using xml....| Python documentation
Editors, Adam Turner and Thomas Wouters,. This article explains the new features in Python 3.13, compared to 3.12. Python 3.13 was released on October 7, 2024. For full details, see the changelog. ...| Python documentation
Execute a child program in a new process. On Unix, the class uses| docs.python.org
15.3. time — Time access and conversions¶| docs.python.org
7.1. Fancier Output Formatting¶| docs.python.org
28.1. sys — System-specific parameters and functions¶| docs.python.org
Source code: Lib/socket.py This module provides access to the BSD socket interface. It is available on all modern Unix systems, Windows, MacOS, and probably additional platforms. Availability: not ...| Python documentation
Source code: Lib/glob.py The glob module finds all the pathnames matching a specified pattern according to the rules used by the Unix shell, although results are returned in arbitrary order. No til...| Python documentation
Source code: Lib/calendar.py This module allows you to output calendars like the Unix cal program, and provides additional useful functions related to the calendar. By default, these calendars have...| Python documentation
Classes provide a means of bundling data and functionality together. Creating a new class creates a new type of object, allowing new instances of that type to be made. Each class instance can have ...| Python documentation