Python Documentation Contents
Python Documentation Contents
Python Documentation Contents
New Features
Assignment expressions
Positional-only parameters
New Modules
Improved Modules
ast
asyncio
builtins
collections
cProfile
csv
curses
ctypes
datetime
functools
gc
gettext
gzip
inspect
io
itertools
json.tool
logging
math
mmap
multiprocessing
os
os.path
pathlib
pickle
plistlib
pprint
py_compile
shlex
shutil
socket
ssl
statistics
sys
tarfile
threading
tokenize
tkinter
time
typing
unicodedata
unittest
venv
weakref
xml
xmlrpc
Optimizations
Deprecated
New Features
PEP 560: Core Support for typing module and Generic Types
PEP 552: Hash-based .pyc Files
New Modules
contextvars
dataclasses
importlib.resources
Improved Modules
argparse
asyncio
binascii
calendar
collections
compileall
concurrent.futures
contextlib
cProfile
crypt
datetime
dbm
decimal
dis
distutils
enum
functools
gc
hmac
http.client
http.server
importlib
io
ipaddress
itertools
locale
logging
math
mimetypes
msilib
multiprocessing
os
pathlib
pdb
py_compile
pydoc
queue
re
signal
socket
socketserver
sqlite3
ssl
string
subprocess
sys
time
tkinter
tracemalloc
types
unicodedata
unittest
unittest.mock
urllib.parse
uu
uuid
warnings
xml.etree
xmlrpc.server
zipapp
zipfile
C API Changes
Build Changes
Optimizations
aifc
asyncio
collections
dbm
enum
gettext
importlib
locale
macpath
threading
socket
ssl
sunau
sys
wave
Module Removals
Windows-only Changes
Windows-only Changes
New Features
New Modules
secrets
Improved Modules
array
ast
asyncio
binascii
cmath
collections
concurrent.futures
contextlib
datetime
decimal
distutils
encodings
enum
faulthandler
fileinput
hashlib
http.client
importlib
inspect
json
logging
math
multiprocessing
os
pathlib
pdb
pickle
pickletools
pydoc
random
re
readline
rlcompleter
shlex
site
sqlite3
socket
socketserver
ssl
statistics
struct
subprocess
sys
telnetlib
time
timeit
tkinter
traceback
tracemalloc
typing
unicodedata
unittest.mock
urllib.request
urllib.robotparser
venv
warnings
winreg
winsound
xmlrpc.client
zipfile
zlib
Optimizations
Other Improvements
Deprecated
New Keywords
asynchat
asyncore
dbm
distutils
grp
importlib
os
re
ssl
tkinter
venv
Removed
New Features
New Modules
typing
zipapp
Improved Modules
argparse
asyncio
bz2
cgi
cmath
code
collections
collections.abc
compileall
concurrent.futures
configparser
contextlib
csv
curses
dbm
difflib
distutils
doctest
enum
faulthandler
functools
glob
gzip
heapq
http
http.client
imaplib
imghdr
importlib
inspect
io
ipaddress
json
linecache
locale
logging
lzma
math
multiprocessing
operator
os
pathlib
pickle
poplib
re
readline
selectors
shutil
signal
smtpd
smtplib
sndhdr
socket
ssl
Other Changes
sqlite3
subprocess
sys
sysconfig
tarfile
threading
time
timeit
tkinter
traceback
types
unicodedata
unittest
unittest.mock
urllib
wsgiref
xmlrpc
xml.sax
zipfile
Optimizations
Deprecated
New Keywords
Removed
New Features
Documentation Changes
New Modules
asyncio
ensurepip
enum
pathlib
selectors
statistics
tracemalloc
Improved Modules
abc
aifc
argparse
audioop
base64
collections
colorsys
contextlib
dbm
dis
doctest
filecmp
functools
gc
glob
hashlib
hmac
html
http
importlib
inspect
ipaddress
logging
marshal
mmap
multiprocessing
operator
os
pdb
pickle
plistlib
poplib
pprint
pty
pydoc
re
resource
select
shelve
shutil
smtpd
smtplib
socket
sqlite3
ssl
stat
struct
subprocess
sunau
sys
tarfile
textwrap
threading
traceback
types
urllib
unittest
venv
wave
weakref
xml.etree
zipfile
Other Improvements
Significant Optimizations
Deprecated
Deprecated Features
Removed
Code Cleanups
Changed in 3.4.3
PEP 476: Enabling certificate verification by default for stdlib http clients
Features
API changes
Functionality
New APIs
Visible Changes
New Modules
faulthandler
ipaddress
lzma
Improved Modules
abc
array
base64
binascii
bz2
codecs
collections
contextlib
crypt
curses
datetime
decimal
Features
API changes
Policy Framework
ftplib
functools
gc
hmac
http
html
imaplib
inspect
io
itertools
logging
math
mmap
multiprocessing
nntplib
os
pdb
pickle
pydoc
re
sched
select
shlex
shutil
signal
smtpd
smtplib
socket
socketserver
sqlite3
ssl
stat
struct
subprocess
sys
tarfile
tempfile
textwrap
threading
time
types
unittest
urllib
webbrowser
xml.etree.ElementTree
zlib
Optimizations
Deprecated
Deprecated features
Porting C code
Building C extensions
Command Line Switch Changes
elementtree
functools
itertools
collections
threading
math
abc
io
reprlib
logging
csv
contextlib
ftp
popen
select
gzip and zipfile
tarfile
hashlib
ast
os
shutil
sqlite3
html
socket
ssl
nntp
certificates
imaplib
http.client
unittest
random
poplib
asyncore
tempfile
inspect
pydoc
dis
dbm
ctypes
site
sysconfig
pdb
configparser
urllib.parse
mailbox
turtledemo
Multi-threading
Optimizations
Unicode
Codecs
Documentation
IDLE
Code Repository
Optimizations
IDLE
Print Is A Function
Ordering Comparisons
Integers
New Syntax
Changed Syntax
Removed Syntax
Library Changes
Changes To Exceptions
Builtins
Performance
Interpreter Changes
Optimizations
Capsules
Documentation Changes
PEP 476: Enabling certificate verification by default for stdlib http clients
Acknowledgements
Python 3.0
Optimizations
Interpreter Changes
ctypes Enhancements
Acknowledgements
Optimizations
Port-Specific Changes
Acknowledgements
What’s New in Python 2.4
Optimizations
cookielib
doctest
Port-Specific Changes
Acknowledgements
Extended Slices
String Changes
Optimizations
Date/Time Type
Port-Specific Changes
Acknowledgements
Introduction
Descriptors
Attribute Access
Related Links
Unicode Changes
Acknowledgements
Introduction
Acknowledgements
Introduction
What About Python 1.6?
Unicode
List Comprehensions
Augmented Assignment
String Methods
Porting to 2.0
Extending/Embedding Changes
XML Modules
SAX2 Support
DOM Support
Relationship to PyXML
Module changes
New modules
IDLE Improvements
Acknowledgements
Changelog
Python next
Security
Library
Documentation
Tests
Build
Windows
IDLE
C API
Library
Documentation
Tests
Windows
IDLE
Tools/Demos
C API
Security
Library
Documentation
Tests
Build
Windows
macOS
IDLE
Tools/Demos
C API
Security
Library
Documentation
Tests
Build
Windows
macOS
IDLE
Tools/Demos
C API
Security
Library
Documentation
Tests
Build
Windows
IDLE
Tools/Demos
Security
Library
Documentation
Tests
Build
Windows
macOS
IDLE
C API
Python 3.8.0 beta 1
Security
Library
Documentation
Tests
Build
Windows
macOS
IDLE
Tools/Demos
C API
Security
Library
Documentation
Tests
Build
Windows
macOS
IDLE
Tools/Demos
C API
Security
Library
Documentation
Tests
Build
Windows
IDLE
Tools/Demos
C API
Library
Documentation
Tests
Windows
IDLE
Security
Library
Documentation
Tests
Build
Windows
macOS
IDLE
Tools/Demos
C API
Library
C API
Library
Documentation
Build
Windows
IDLE
Library
Documentation
Tests
Build
macOS
IDLE
Library
Documentation
Tests
Build
Windows
macOS
IDLE
Tools/Demos
Security
Library
Documentation
Tests
Build
Windows
macOS
IDLE
Tools/Demos
C API
Security
Library
Documentation
Tests
Build
Windows
macOS
IDLE
Tools/Demos
Library
Documentation
Tests
Build
Windows
macOS
C API
Documentation
Tests
Windows
Tools/Demos
C API
Library
Documentation
Tests
Build
Windows
macOS
IDLE
Tools/Demos
C API
Library
Documentation
Build
IDLE
C API
Security
Library
Documentation
Tests
Build
Windows
IDLE
Tools/Demos
C API
Library
Documentation
Tests
Build
Windows
macOS
IDLE
Tools/Demos
C API
Tests
Build
Security
Library
Documentation
Tests
Build
Windows
macOS
IDLE
Tools/Demos
C API
Library
Documentation
Tests
Build
Windows
macOS
IDLE
Tools/Demos
C API
Library
Build
Security
Library
Documentation
Tests
Build
Windows
IDLE
Tools/Demos
Python 3.6.2 final
Security
Library
Security
Library
IDLE
C API
Build
Documentation
Tools/Demos
Tests
Windows
Build
Library
IDLE
Windows
C API
Documentation
Tests
Build
Tools/Demos
Windows
Build
Library
C API
Documentation
Tools/Demos
Library
Documentation
Tests
Build
Library
Windows
Build
Tests
Library
Windows
C API
Build
Tests
Python 3.6.0 beta 1
Library
IDLE
C API
Tests
Build
Tools/Demos
Windows
Library
IDLE
Tests
Windows
Build
Library
Security
Library
Security
Library
IDLE
C API
Build
Tools/Demos
Documentation
Tests
Python 3.6.0 alpha 2
Library
Security
Library
Security
Library
IDLE
Documentation
Tests
Windows
Build
Windows
C API
Tools/Demos
Library
Security
Library
Security
Library
Security
Library
IDLE
Documentation
Tests
Build
Windows
Tools/Demos
C API
Security
Library
Library
Security
Library
Documentation
Tests
Build
Windows
C API
Library
Security
Library
Security
Library
IDLE
C API
Documentation
Tests
Tools/Demos
Windows
Build
Tests
IDLE
Security
Library
Security
Library
Security
Library
Security
Library
Security
Library
IDLE
Documentation
Tests
Build
Windows
Tools/Demos
Windows
Library
IDLE
Documentation
Tests
Build
Windows
Tools/Demos
Build
Library
Build
Library
Library
Library
IDLE
Documentation
Tests
Build
Library
Tests
Documentation
Build
Library
Library
IDLE
Tests
Documentation
Tools/Demos
Library
Build
Tests
Tools/Demos
C API
Library
Build
Tests
Tools/Demos
Library
Build
C API
Windows
Library
IDLE
Build
C API
Documentation
Tests
Tools/Demos
Windows
3.1.1. Numbers
3.1.2. Strings
3.1.3. Lists
4.1. if Statements
4.7.3.5. Recap
5. Data Structures
5.4. Sets
5.5. Dictionaries
6. Modules
6.4. Packages
8.2. Exceptions
9. Classes
9.5. Inheritance
9.8. Iterators
9.9. Generators
10.6. Mathematics
11.2. Templating
11.4. Multi-threading
11.5. Logging
12.1. Introduction
2.1.1. On Linux
2.1.3. On OpenSolaris
2.4. Miscellaneous
3.7.4. Customization
3.7.5. Diagnostics
3.9.1. PyWin32
3.9.2. cx_Freeze
3.9.3. WConio
4.1.3. Configuration
1. Introduction
1.2. Notation
2. Lexical analysis
2.1.3. Comments
2.1.8. Indentation
2.4. Literals
2.5. Operators
2.6. Delimiters
3. Data model
3.3.2.4. __slots__
3.3.3.1. Metaclasses
3.4. Coroutines
4. Execution model
4.3. Exceptions
5.1. importlib
5.2. Packages
5.3. Searching
5.4. Loading
5.4.1. Loaders
5.4.2. Submodules
5.4.5. module.__path__
5.8.1. __main__.__spec__
5.10. References
6. Expressions
6.2. Atoms
6.2.2. Literals
6.2.9.2. Examples
6.3. Primaries
6.3.2. Subscriptions
6.3.3. Slicings
6.3.4. Calls
6.10. Comparisons
6.13. Lambdas
7. Simple statements
7.1. Expression statements
8. Compound statements
8.8. Coroutines
9. Top-level components
9.1. Complete Python programs
Introduction
Notes on availability
Built-in Functions
Built-in Constants
Built-in Types
Comparisons
Iterator Types
Generator Types
Lists
Tuples
Ranges
Text Sequence Type — str
String Methods
Bytes Objects
Bytearray Objects
Memory Views
Modules
Functions
Methods
Code Objects
Type Objects
Boolean Values
Internal Objects
Special Attributes
Built-in Exceptions
Base classes
Concrete exceptions
OS exceptions
Warnings
Exception hierarchy
String constants
Format examples
Template strings
Helper functions
Module Contents
Match Objects
Simulating scanf()
Making a Phonebook
Text Munging
Writing a Tokenizer
SequenceMatcher Objects
SequenceMatcher Examples
Differ Objects
Differ Example
Init file
Line buffer
History file
History list
Startup hooks
Completion
Example
Completer Objects
Format Strings
Format Characters
Examples
Classes
Error Handlers
IncrementalEncoder Objects
IncrementalDecoder Objects
StreamWriter Objects
StreamReader Objects
StreamReaderWriter Objects
StreamRecoder Objects
Standard Encodings
Text Encodings
Binary Transforms
Text Transforms
Data Types
Constants
Available Types
Common Properties
timedelta Objects
date Objects
datetime Objects
Examples of Usage: datetime
time Objects
tzinfo Objects
timezone Objects
Technical Detail
ChainMap objects
Counter objects
deque objects
deque Recipes
defaultdict objects
defaultdict Examples
OrderedDict objects
UserDict objects
UserList objects
UserString objects
Basic Examples
Theory
bisect — Array bisection algorithm
Other Examples
Example
Finalizer Objects
PrettyPrinter Objects
Example
Repr Objects
Module Contents
Creating an Enum
Iteration
Comparisons
Pickling
Functional API
Derived Enumerations
IntEnum
IntFlag
Flag
Others
Interesting examples
Omitting values
Using auto
Using object
OrderedEnum
DuplicateFreeEnum
Planet
TimePeriod
Enum Classes
Finer Points
Trigonometric functions
Angular conversion
Hyperbolic functions
Special functions
Constants
Trigonometric functions
Hyperbolic functions
Classification functions
Constants
Quick-start Tutorial
Decimal objects
Logical operands
Context objects
Constants
Rounding modes
Signals
Special values
Recipes
Decimal FAQ
Bookkeeping functions
Real-valued distributions
Alternative Generator
Notes on Reproducibility
Measures of spread
Function details
Exceptions
NormalDist objects
Itertool functions
Itertools Recipes
In-place Operators
Basic use
Pure paths
General properties
Operators
Concrete paths
Methods
Examples
rmtree example
Archiving operations
Archiving example
Data Persistence
Module Interface
Dispatch Tables
Out-of-band Buffers
Provider API
Consumer API
Example
Restricting Globals
Performance
Examples
Example
Restrictions
Example
Connection Objects
Cursor Objects
Row Objects
Exceptions
Introduction
Controlling Transactions
Common issues
Multithreading
(De)compression of files
Incremental (de)compression
One-shot (de)compression
Examples of usage
Miscellaneous
Examples
ZipFile Objects
Path Objects
PyZipFile Objects
ZipInfo Objects
Command-Line Interface
Command-line options
Decompression pitfalls
Resources limitations
Interruption
TarFile Objects
TarInfo Objects
Command-Line Interface
Command-line options
Examples
Unicode issues
File Formats
Module Contents
Reader Objects
Writer Objects
Examples
Quick Start
Supported Datatypes
Fallback Values
Interpolation of values
ConfigParser Objects
RawConfigParser Objects
Exceptions
netrc Objects
Packer Objects
Unpacker Objects
Exceptions
Examples
Cryptographic Services
Hash algorithms
Key derivation
BLAKE2
Constants
Examples
Simple hashing
Keyed hashing
Randomized hashing
Personalization
Tree mode
Credits
Random numbers
Generating tokens
Other functions
Process Parameters
Process Management
Random numbers
Overview
Text I/O
Binary I/O
Raw I/O
In-memory streams
Class hierarchy
Buffered Streams
Text I/O
Performance
Binary I/O
Text I/O
Multi-threading
Reentrancy
time — Time access and conversions
Functions
Clock ID Constants
Timezone Constants
Example
Creating a parser
Adding arguments
Parsing arguments
ArgumentParser objects
prog
usage
description
epilog
parents
formatter_class
prefix_chars
fromfile_prefix_chars
argument_default
allow_abbrev
conflict_handler
add_help
name or flags
action
nargs
const
default
type
choices
required
help
metavar
dest
Action classes
Invalid arguments
Arguments containing -
Beyond sys.argv
Other utilities
Sub-commands
FileType objects
Argument groups
Mutual exclusion
Parser defaults
Printing help
Partial parsing
Exiting methods
Intermixed parsing
Logger Objects
Logging Levels
Handler Objects
Formatter Objects
Filter Objects
LogRecord Objects
LogRecord attributes
LoggerAdapter Objects
Thread Safety
Module-Level Functions
Module-Level Attributes
Configuration functions
Incremental Configuration
Object connections
User-defined objects
StreamHandler
FileHandler
NullHandler
WatchedFileHandler
BaseRotatingHandler
RotatingFileHandler
TimedRotatingFileHandler
SocketHandler
DatagramHandler
SysLogHandler
NTEventLogHandler
SMTPHandler
MemoryHandler
HTTPHandler
QueueHandler
QueueListener
Functions
Window Objects
Constants
Textbox objects
Functions
Panel Objects
Cross Platform
Java Platform
Windows Platform
Mac OS Platform
Unix Platforms
ctypes tutorial
Loading dynamic link libraries
Calling functions
Return types
Arrays
Pointers
Type conversions
Incomplete Types
Callback functions
Surprises
ctypes reference
Foreign functions
Function prototypes
Utility functions
Data types
Concurrent Execution
Thread-Local Data
Thread Objects
Lock Objects
RLock Objects
Condition Objects
Semaphore Objects
Semaphore Example
Event Objects
Timer Objects
Barrier Objects
Introduction
Reference
Miscellaneous
Connection Objects
Synchronization primitives
Managers
Customized managers
Proxy Objects
Cleanup
Process Pools
Address Formats
Authentication keys
Logging
Programming guidelines
Examples
Executor Objects
ThreadPoolExecutor
ThreadPoolExecutor Example
ProcessPoolExecutor
ProcessPoolExecutor Example
Future Objects
Module Functions
Exception classes
Popen Constructor
Exceptions
Security Considerations
Popen Objects
Windows Constants
Replacing os.system()
Notes
Scheduler Objects
Queue Objects
SimpleQueue Objects
Context Variables
Coroutines
Awaitables
Creating Tasks
Sleeping
Timeouts
Waiting Primitives
Introspection
Task Object
Generator-based Coroutines
Streams
StreamReader
StreamWriter
Examples
Synchronization Primitives
Lock
Event
Condition
Semaphore
BoundedSemaphore
Subprocesses
Creating Subprocesses
Constants
Examples
Queues
Queue
Priority Queue
LIFO Queue
Exceptions
Examples
Exceptions
Event Loop
Scheduling callbacks
Transferring files
TLS Upgrade
DNS
Running Subprocesses
Callback Handles
Server Objects
Examples
Futures
Future Functions
Future Object
Transports
Transports Hierarchy
Base Transport
Read-only Transports
Write-only Transports
Datagram Transports
Subprocess Transports
Protocols
Base Protocols
Base Protocol
Streaming Protocols
Subprocess Protocols
Examples
Policies
Policy Objects
Process Watchers
Custom Policies
Platform Support
All Platforms
Windows
macOS
Tasks
Queues
Subprocesses
Streams
Synchronization
Exceptions
Protocols
Debug Mode
Logging
Socket families
Module contents
Exceptions
Constants
Functions
Creating sockets
Other functions
Socket Objects
Example
Socket creation
Context creation
Exceptions
Random generation
Certificate handling
Constants
SSL Sockets
SSL Contexts
Certificates
Certificate chains
CA certificates
Self-signed certificates
Examples
Client-side operation
Server-side operation
SSL session
Security considerations
Best defaults
Manual settings
Verifying certificates
Protocol versions
Cipher selection
Multi-processing
TLS 1.3
LibreSSL support
Polling Objects
Kqueue Objects
Kevent Objects
Introduction
Classes
Examples
asynchat Example
General rules
Module contents
Example
Note on SIGPIPE
MADV_* Constants
FeedParser API
Parser API
Additional notes
email: Examples
email.encoders: Encoders
email.iterators: Iterators
Basic Usage
Exceptions
Character Encodings
Implementation Limitations
Mailbox objects
Maildir
mbox
MH
Babyl
MMDF
Message objects
MaildirMessage
mboxMessage
MHMessage
BabylMessage
MMDFMessage
Exceptions
Examples
MimeTypes Objects
Notes
HTMLParser Methods
Examples
XML vulnerabilities
Tutorial
Parsing XML
Additional resources
XPath support
Example
Reference
Functions
XInclude support
Example
Reference
Functions
Element Objects
ElementTree Objects
QName Objects
TreeBuilder Objects
XMLParser Objects
XMLPullParser Objects
Exceptions
Module Contents
Node Objects
NodeList Objects
DocumentType Objects
Document Objects
Element Objects
Attr Objects
NamedNodeMap Objects
Comment Objects
ProcessingInstruction Objects
Exceptions
Conformance
Type Mapping
Accessor Methods
DOM Objects
DOM Example
DOMEventStream Objects
SAXException Objects
ContentHandler Objects
DTDHandler Objects
EntityResolver Objects
ErrorHandler Objects
XMLReader Objects
IncrementalParser Objects
Locator Objects
InputSource Objects
XMLParser Objects
ExpatError Exceptions
Example
Introduction
Functions
Examples
Request Objects
OpenerDirector Objects
BaseHandler Objects
HTTPRedirectHandler Objects
HTTPCookieProcessor Objects
ProxyHandler Objects
HTTPPasswordMgr Objects
HTTPPasswordMgrWithPriorAuth Objects
AbstractBasicAuthHandler Objects
HTTPBasicAuthHandler Objects
ProxyBasicAuthHandler Objects
AbstractDigestAuthHandler Objects
HTTPDigestAuthHandler Objects
ProxyDigestAuthHandler Objects
HTTPHandler Objects
HTTPSHandler Objects
FileHandler Objects
DataHandler Objects
FTPHandler Objects
CacheFTPHandler Objects
UnknownHandler Objects
HTTPErrorProcessor Objects
Examples
Legacy interface
urllib.request Restrictions
URL Parsing
URL Quoting
HTTPConnection Objects
HTTPResponse Objects
Examples
HTTPMessage Objects
FTP Objects
FTP_TLS Objects
POP3 Objects
POP3 Example
IMAP4 Objects
IMAP4 Example
NNTP Objects
Attributes
Methods
Utility functions
SMTP Objects
SMTP Example
SMTPServer Objects
DebuggingServer Objects
PureProxy Objects
MailmanProxy Objects
SMTPChannel Objects
Telnet Objects
Telnet Example
Example
Server Objects
Examples
socketserver.TCPServer Example
socketserver.UDPServer Example
Asynchronous Mixins
Cookie Objects
Morsel Objects
Example
CookiePolicy Objects
DefaultCookiePolicy Objects
Cookie Objects
Examples
ServerProxy Objects
DateTime Objects
Binary Objects
Fault Objects
ProtocolError Objects
MultiCall Objects
Convenience Functions
SimpleXMLRPCServer Objects
SimpleXMLRPCServer Example
CGIXMLRPCRequestHandler
DocXMLRPCServer Objects
DocCGIXMLRPCRequestHandler
IP Addresses
Address objects
Operators
Comparison operators
Arithmetic operators
IP Network definitions
Network objects
Operators
Logical operators
Iteration
Interface objects
Operators
Logical operators
Custom Exceptions
Multimedia Services
AU_read Objects
AU_write Objects
Wave_read Objects
Wave_write Objects
Internationalization
Class-based API
Deferred translations
Acknowledgements
Program Frameworks
Introduction
Turtle methods
Methods of TurtleScreen/Screen
Pen control
Drawing state
Color control
Filling
Turtle state
Visibility
Appearance
Using events
Compound shapes
Window control
Animation control
Input methods
Public classes
Cmd Objects
Cmd Example
shlex Objects
Parsing Rules
Tkinter Modules
Handy Reference
Setting Options
The Packer
Packer Options
Images
File Handlers
Using Ttk
Ttk Widgets
Widget
Standard Options
Label Options
Compatibility Options
Widget States
ttk.Widget
Combobox
Options
Virtual events
ttk.Combobox
Spinbox
Options
Virtual events
ttk.Spinbox
Notebook
Options
Tab Options
Tab Identifiers
Virtual Events
ttk.Notebook
Progressbar
Options
ttk.Progressbar
Separator
Options
Sizegrip
Platform-specific notes
Bugs
Treeview
Options
Item Options
Tag Options
Column Identifiers
Virtual Events
ttk.Treeview
Ttk Styling
Layouts
Using Tix
Tix Widgets
Basic Widgets
File Selectors
Hierarchical ListBox
Tabular ListBox
Manager Widgets
Image Types
Miscellaneous Widgets
Tix Commands
IDLE
Menus
Context Menus
Editor windows
Key bindings
Automatic indentation
Completions
Calltips
Code Context
Text colors
Startup failure
Help sources
Setting preferences
IDLE on macOS
Extensions
Development Tools
typing — Support for type hints
Type aliases
NewType
Callable
Generics
How It Works
Option Flags
Directives
Warnings
Basic API
Unittest API
Advanced API
DocTest Objects
Example Objects
DocTestFinder objects
DocTestParser objects
DocTestRunner objects
OutputChecker objects
Debugging
Soapbox
Basic example
Command-Line Interface
Command-line options
Test Discovery
Test cases
Deprecated aliases
Grouping tests
load_tests Protocol
Signal Handling
Quick Guide
Calling
Deleting Attributes
patch
patch.object
patch.dict
patch.multiple
patch builtins
TEST_PREFIX
Where to patch
Magic Mock
Helpers
sentinel
DEFAULT
call
create_autospec
ANY
FILTER_DIR
mock_open
Autospeccing
Sealing mocks
Using Mock
Mocking Classes
Naming your mocks
Patch Decorators
Further Examples
Partial mocking
Nesting Patches
Using 2to3
Fixers
Example
Debugger Commands
Limitations
Calibration
Basic Examples
Python Interface
Command-Line Interface
Examples
trace — Trace or track Python statement execution
Command-Line Usage
Main options
Modifiers
Filters
Programmatic Interface
Examples
Compute differences
Pretty top
API
Functions
DomainFilter
Filter
Frame
Snapshot
Statistic
StatisticDiff
Trace
Traceback
Module API
Basic Example
Command-Line Interface
Python API
Examples
Caveats
Configuration variables
Installation paths
Other functions
Warning Categories
Testing Warnings
Updating Code For New Versions of Dependencies
Available Functions
Post-init processing
Class variables
Init-only variables
Frozen instances
Inheritance
Exceptions
Utilities
atexit Example
TracebackException Objects
StackSummary Objects
FrameSummary Objects
Traceback Examples
Readline configuration
Module contents
Importing Modules
zipimporter Objects
Examples
Introduction
Functions
importlib.resources – Resources
Examples
Importing programmatically
Setting up an importer
Approximating importlib.import_module()
Using importlib.metadata
Overview
Functional API
Entry points
Distribution metadata
Distribution versions
Distribution files
Distribution requirements
Distributions
Creating ST Objects
Converting ST Objects
Queries on ST Objects
ST Objects
Node classes
Abstract Grammar
ast Helpers
Tokenizing Input
Command-Line Usage
Examples
Function Objects
Class Objects
Command-line use
Public functions
Bytecode analysis
Analysis functions
Python Bytecode Instructions
Opcode collections
Programmatic Interface
Miscellaneous Services
Formatter Implementations
Writer Implementations
Database Objects
View Objects
Record Objects
Errors
CAB Objects
Directory Objects
Features
GUI classes
Precomputed tables
File Operations
Console I/O
Other Functions
Constants
HKEY_* Constants
Access Rights
64-bit Specific
Value Types
Hashing Methods
Module Attributes
Module Functions
Examples
Example
Example
Template Objects
Resource Usage
Examples
Simple example
Superseded Modules
Background
Terminology
Tutorial
Other actions
Default values
Generating help
Grouping Options
Reference Guide
Defining options
Option attributes
Parsing arguments
Cleanup
Other methods
Option Callbacks
Extending optparse
Examples
Undocumented Modules
Introduction
Coding standards
Include Files
Useful macros
Reference Counts
Types
Exceptions
Embedding Python
Debugging Builds
Reference Counting
Exception Handling
Raising exceptions
Issuing warnings
Signal Handling
Exception Classes
Exception Objects
Recursion Control
Standard Exceptions
Utilities
System Functions
Process Control
Importing Modules
Parsing arguments
Numbers
Other objects
API Functions
Building values
Reflection
Codec registry and support functions
Object Protocol
Number Protocol
Sequence Protocol
Mapping Protocol
Iterator Protocol
Buffer Protocol
Buffer structure
request-independent fields
readonly, format
contiguity requests
compound requests
Complex arrays
Buffer-related functions
Fundamental Objects
Type Objects
Numeric Objects
Integer Objects
Boolean Objects
Sequence Objects
Bytes Objects
Macros
Unicode Objects
Unicode Type
Locale Encoding
wchar_t Support
Built-in Codecs
Generic Codecs
UTF-8 Codecs
UTF-32 Codecs
UTF-16 Codecs
UTF-7 Codecs
Unicode-Escape Codecs
Raw-Unicode-Escape Codecs
Latin-1 Codecs
ASCII Codecs
Tuple Objects
List Objects
Container Objects
Dictionary Objects
Set Objects
Function Objects
Function Objects
Method Objects
Cell Objects
Code Objects
Other Objects
File Objects
Module Objects
Initializing C modules
Single-phase initialization
Multi-phase initialization
Support functions
Module lookup
Iterator Objects
Descriptor Objects
Slice Objects
Ellipsis Object
MemoryView objects
Capsules
Generator Objects
Coroutine Objects
DateTime Objects
Process-wide parameters
High-level API
Low-level API
Sub-interpreter support
Asynchronous Notifications
Dynamic Allocation
Methods
PyWideStringList
PyStatus
PyPreConfig
PyConfig
Isolated Configuration
Python Configuration
Path Configuration
Py_RunMain()
Memory Management
Overview
Memory Interface
Object allocators
tracemalloc C API
Examples
Type Objects
Quick Reference
“tp slots”
sub-slots
slot typedefs
PyTypeObject Definition
PyObject Slots
PyVarObject Slots
PyTypeObject Slots
Heap Types
Examples
Key terms
How do I…?
Key terms
Basic usage
How do I …?
Python HOWTOs
Details
Make sure you specify the proper version support in your setup.py file
Division
What is curses?
Displaying Text
User Input
Abstract
Descriptor Protocol
Invoking Descriptors
Descriptor Example
Properties
Introduction
Formal provability
Modularity
Composability
Iterators
Generators
Built-in functions
Combinatoric functions
Grouping elements
References
General
Python-specific
Python documentation
Logging HOWTO
A simple example
Logging to a file
Next Steps
Logging Flow
Loggers
Handlers
Formatters
Configuring Logging
Custom Levels
Useful Handlers
Optimization
Logging Cookbook
Using concurrent.futures.ProcessPoolExecutor
Customizing LogRecord
Introduction
Simple Patterns
Matching Characters
Repeating Things
Performing Matches
Module-Level Functions
Compilation Flags
More Metacharacters
Grouping
Lookahead Assertions
Modifying Strings
Splitting Strings
Common Problems
Using re.VERBOSE
Feedback
Sockets
History
Creating a Socket
IPC
Using a Socket
Binary Data
Disconnecting
Non-blocking Sockets
Sorting HOW TO
Sorting Basics
Key Functions
Unicode HOWTO
Introduction to Unicode
Definitions
Encodings
References
Converting to Bytes
Unicode Properties
Comparing Strings
References
Unicode filenames
References
Acknowledgements
Introduction
Fetching URLs
Data
Headers
Handling Exceptions
URLError
HTTPError
Error Codes
Wrapping it Up
Number 1
Number 2
Basic Authentication
Proxies
Footnotes
Argparse Tutorial
Concepts
The basics
Short options
Conflicting options
Conclusion
A Note on IP Versions
IP Host Addresses
Defining Networks
Host Interfaces
Comparisons
Advanced Topics
Optional Groups
Py_buffer
Advanced converters
SystemTap Tapsets
Examples
General Information
Programming FAQ
General Questions
Core Language
Performance
Sequences (Tuples/Lists)
Objects
Modules
Why does Python use methods for some functionality (e.g. list.index()) but functions for other
(e.g. len(list))?
Why does Python allow commas at the end of lists and tuples?
Common tasks
Threads
Network/Internet Programming
Databases
Extending/Embedding FAQ
How do I catch the output from PyErr_Print() (or anything that prints to stdout/stderr)?
I added a module using the Setup file and the make fails; why?
I want to compile a Python module on my Linux system, but some files are missing. Why?
Can I create an object class with some methods implemented in C and others in Python (e.g.
through inheritance)?
What is Python?
Glossary
Documentation bugs
Copyright
Mersenne Twister
Sockets
Cookie management
Execution tracing
test_epoll
Select kqueue
SipHash24
OpenSSL
expat
libffi
zlib
cfuhash
libmpdec