Python 3 standard library by example Page

The Python 3 Standard Library by Example by Doug Hellmann



Return to Python Module Index, Python Standard Library Modules List, Python 3 Module of the Week, Python Standard Library], Python Libraries, Python Official Glossary, Python Topics, Python, Python DevOps, Python DevSecOps - Python Security, Python NetDevOps, Python Data Science - Python DataOps, Python Machine Learning - Python MLOps, Cloud Native Python, Python Reserved Words, Awesome Python


Fair Use Source: B072QZZDV7

Return to Python bibliography, IT bibliography, Python Topics

Python 3 Standard Library by Example by Doug Hellmann

Master the Powerful Python 3 Standard Library through Real Code Examples

Introduction


"Distributed with every copy of Python, the Python standard library contains hundreds of Python modules that provide Python tools for interacting with the operating system, Python interpreter, and Python Internet — all of them tested and ready to be used to jump-start the Python development of your Python applications. This book presents selected Python examples demonstrating how to use the most commonly used Python features of the Python modules that support Python’s “batteries included” slogan, taken from the popular Python Module of the Week (PyMOTW) blog series."



“The genius of Doug’s approach is that with 15 minutes per week, any motivated programmer can learn the Python Standard Library. Doug’s guided tour will help you flip the switch to fully power-up Python’s batteries.”

–Raymond Hettinger, Distinguished Python Core Developer

The Python 3 Standard Library contains hundreds of Python modules for interacting with the operating system, interpreter, and Internet – all extensively tested and ready to jump-start application development. Now, Python expert Doug Hellmann introduces every major area of the Python 3.x library through concise source code and output examples. Hellmann’s examples fully demonstrate each feature and are designed for easy learning and reuse.



You’ll find practical code for working with text, data structures, algorithms, dates/times, math, the file system, persistence, data exchange, compression, archiving, crypto, processes/threads, networking, Internet capabilities, email, developer and language tools, the runtime, packages, and more. Each section fully covers one module, with links to additional resources, making this book an ideal tutorial and reference.



The Python 3 Standard Library by Example introduces Python 3.x’s new libraries, significant functionality changes, and new layout and naming conventions. Hellmann also provides expert porting guidance for moving code from 2.x Python standard library modules to their Python 3.x equivalents.

* Manipulate text with string, textwrap, re (regular expressions), and difflib
* Use data structures: enum, collections, array, heapq, queue, struct, copy, and more
* Implement algorithms elegantly and concisely with functools, itertools, and contextlib
* Handle dates/times and advanced mathematical tasks
* Archive and data compression
* Understand data exchange and persistence, including json, dbm, and sqlite
* Sign and verify messages cryptographically
* Manage concurrent operations with processes and threads
* Test, debug, compile, profile, language, import, and package tools
* Control interaction at runtime with interpreters or the environment

About the Author


Doug Hellmann is currently employed by Red Hat to work on OpenStack. He is on the OpenStack Technical Committee and contributes to many aspects of the project. He has been programming in Python since version 1.4, and has worked on a variety of UNIX and non-UNIX platforms for projects in fields such as mapping, medical news publishing, banking, and data center automation. Doug is a Fellow of the Python Software Foundation and served as its Communications Director from 2010-2012. After a year as a regular columnist for Python Magazine, he served as Editor-in-Chief from 2008-2009. Between 2007 and 2011, Doug published the popular "Python Module of the Week" series on his blog, and an earlier version of this book (for Python 2), The Python Standard Library By Example (Addison-Wesley, 2011) . He lives in Athens, Georgia.


Book Details


* Publication Date: June 14, 2017
* Print Length: 1456 pages
* Publisher: Addison-Wesley Professional; 1st Edition (June 14, 2017)
* Simultaneous Device Usage : Up to 5 simultaneous devices, per Greedy DRM publisher limits - see DE-DRM from Big Tech avarice.
* ASIN: B072QZZDV7
* ISBN-13: 978-0-13-429105-5
* ISBN-10: 0-13-429105-0


Introduction


"Distributed with every copy of Python, the Python standard library contains hundreds of Python modules that provide Python tools for interacting with the operating system, Python interpreter, and Internet — all of them Python tested and ready to be used to jump-start the Python development of your Python applications. This Python book presents selected Python examples demonstrating how to use the most commonly used Python features of the Python modules that support Python’s “batteries included” slogan, taken from the popular Python Module of the Week (PyMOTW) Python blog series." Fair Use Source: B072QZZDV7




This Book’s Target Audience



The audience for this book consists of intermediate-level Python programmers. Thus, although all of the source code is presented with discussion, only a few cases include line-by-line explanations. Every section focuses on the features of the modules, illustrated by the source code and output from fully independent example programs. Each feature is presented as concisely as possible, so the reader can focus on the module or function being demonstrated without being distracted by the supporting code.

An experienced programmer who is familiar with other languages may be able to learn Python from this book, but the text is not intended to be an introduction to the language. Some prior experience writing Python programs will be useful when studying the examples.

Several sections, such as the description of network programming with sockets or hmac encryption, require domain-specific knowledge. The basic information needed to explain the examples is included here, but the range of topics covered by the modules in the standard library makes it impossible to cover every topic comprehensively in a single volume. The discussion of each module is followed by a list of suggested sources for more information and further reading, including online resources, RFC standards documents, and related books."

Fair Use Source: B072QZZDV7





Contents at a Glance


* Python 3 Standard Library by Example Introduction
* Python 3 Standard Library by Example Acknowledgments
* Python 3 Standard Library by Example About the Author
* Chapter 1 - Python Text
* Chapter 2 - Python Data Structures
* Chapter 3 - Python Algorithms
* Chapter 4 - Python Dates and Times
* Chapter 5 - Python Mathematics
* Chapter 6 - Python and The File System
* Chapter 7 - Python Data Persistence and Exchange
* Chapter 8 - Python Data Compression and Archiving
* Chapter 9 - Python Cryptography
* Chapter 10 - Python Concurrency with Processes, Threads, and Coroutines
* Chapter 11 - Python Networking
* Chapter 12 - Python and The Internet
* Chapter 13 - Python and Email
* Chapter 14 - Python Application Building Blocks
* Chapter 15 - Python Internationalization and Localization
* Chapter 16 - Python Developer Tools
* Chapter 17 - Python Runtime Features
* Chapter 18 - Python Language Tools
* Chapter 19 - Python Modules and Packages
* Appendix A - Python Porting Notes
* Appendix B - Python Outside of the Standard Library
* Index of Python Modules
* Python Index


Detailed Table of Contents


* Python 3 Versus 2

* Introduction
* Acknowledgments
* About the Author

= Chapter 1 - Text

=
Chapter 1 - Python Text
* 1.1 Python string - Text Constants and Templates
* 1.1.1 Python Functions
* 1.1.2 Python Templates
* 1.1.3 Python Advanced Templates
* 1.1.4 Python Formatter
* 1.1.5 Python Constants
* 1.2 Python textwrap - Formatting Text Paragraphs
* 1.2.1 Python Example Data
* 1.2.2 Python Filling Paragraphs
* 1.2.3 Python Removing Existing Indentation
* 1.2.4 Python Combining Dedent and Fill
* 1.2.5 Python Indenting Blocks
* 1.2.6 Python Hanging Indents
* 1.2.7 Python Truncating Long Text
* 1.3 Python re - Regular Expressions
* 1.3.1 Python Finding Patterns in Text
* 1.3.2 Python Compiling Expressions
* 1.3.3 Python Multiple Matches
* 1.3.4 Python Pattern Syntax
* 1.3.5 Python Constraining the Search
* 1.3.6 Python Dissecting Matches with Groups
* 1.3.7 Python Search Options
* 1.3.8 Python Looking Ahead or Behind
* 1.3.9 Python Self-referencing Expressions
* 1.3.10 Python Modifying Strings with Patterns
* 1.3.11 Python Splitting with Patterns
* 1.4 Python difflib - Compare Sequences
* 1.4.1 Python Comparing Bodies of Text
* 1.4.2 Python Junk Data
* 1.4.3 Python Comparing Arbitrary Types


=Chapter 2 - Data Structures

=
Chapter 2 - Python Data Structures
* 2.1 Python enum - Enumeration Type
* 2.1.1 Python Creating Enumerations
* 2.1.2 Python Iteration
* 2.1.3 Python Comparing Enums
* 2.1.4 Python Unique Enumeration Values
* 2.1.5 Python Creating Enumerations Programmatically
* 2.1.6 Python Non-integer Member Values
* 2.2 Python collections - Container Data Types
* 2.2.1 Python ChainMap - Search Multiple Dictionaries
* 2.2.2 Python Counter - Count Hashable Objects
* 2.2.3 Python defaultdict - Missing Keys Return a Default Value
* 2.2.4 Python deque - Double-Ended Queue
* 2.2.5 Python namedtuple - Tuple Subclass with Named Fields
* 2.2.6 Python OrderedDict - Remember the Order Keys Are Added to a Dictionary
* 2.2.7 Python collections.abc - Abstract Base Classes for Containers
* 2.3 Python array - Sequence of Fixed-Type Data
* 2.3.1 Python Initialization
* 2.3.2 Python Manipulating Arrays
* 2.3.3 Python Arrays and Files
* 2.3.4 Python Alternative Byte Ordering
* 2.4 Python heapq - Heap Sort Algorithm
* 2.4.1 Python Example Data
* 2.4.2 Python Creating a Heap
* 2.4.3 Python Accessing the Contents of a Heap
* 2.4.4 Python Data Extremes from a Heap
* 2.4.5 Python Efficiently Merging Sorted Sequences
* 2.5 Python bisect - Maintain Lists in Sorted Order
* 2.5.1 Python Inserting in Sorted Order
* 2.5.2 Python Handling Duplicates
* 2.6 Python queue - Thread-Safe FIFO Implementation
* 2.6.1 Python Basic FIFO Queue
* 2.6.2 Python LIFO Queue
* 2.6.3 Python Priority Queue
* 2.6.4 Python Building a Threaded Podcast Client
* 2.7 Python struct - Binary Data Structures
* 2.7.1 Python Functions Versus Struct Class
* 2.7.2 Python Packing and Unpacking
* 2.7.3 Python Endianness
* 2.7.4 Python Buffers
* 2.8 Python weakref - Impermanent References to Objects
* 2.8.1 Python References
* 2.8.2 Python Reference Callbacks
* 2.8.3 Python Finalizing Objects
* 2.8.4 Python Proxies
* 2.8.5 Python Caching Objects
* 2.9 Python copy - Duplicate Objects
* 2.9.1 Python Shallow Copies
* 2.9.2 Python Deep Copies
* 2.9.3 Python Customizing Copy Behavior
* 2.9.4 Python Recursion in Deep Copy
* 2.10 Python pprint - Pretty-Print Data Structures
* 2.10.1 Python Printing
* 2.10.2 Python Formatting
* 2.10.3 Python Arbitrary Classes
* 2.10.4 Python Recursion
* 2.10.5 Python Limiting Nested Output
* 2.10.6 Python Controlling Output Width


=Chapter 3 - Algorithms

=
Chapter 3 - Python Algorithms
* 3.1 Python functools - Tools for Manipulating Functions
* 3.1.1 Python Decorators
* 3.1.2 Python Comparison
* 3.1.3 Python Caching
* 3.1.4 Python Reducing a Data Set
* 3.1.5 Python Generic Functions
* 3.2 Python itertools - Iterator Functions
* 3.2.1 Python Merging and Splitting Iterators
* 3.2.2 Python Converting Inputs
* 3.2.3 Python Producing New Values
* 3.2.4 Python Filtering
* 3.2.5 Python Grouping Data
* 3.2.6 Python Combining Inputs
* 3.3 Python operator - Functional Interface to Built-in Operators
* 3.3.1 Python Logical Operations
* 3.3.2 Python Comparison Operators
* 3.3.3 Python Arithmetic Operators
* 3.3.4 Python Sequence Operators
* 3.3.5 Python In-Place Operators
* 3.3.6 Python Attribute and Item “Getters”
* 3.3.7 Python Combining Operators and Custom Classes
* 3.4 Python contextlib - Context Manager Utilities
* 3.4.1 Python Context Manager API
* 3.4.2 Python Context Managers as Function Decorators
* 3.4.3 Python From Generator to Context Manager
* 3.4.4 Python Closing Open Handles
* 3.4.5 Python Ignoring Exceptions
* 3.4.6 Python Redirecting Output Streams
* 3.4.7 Python Dynamic Context Manager Stacks


=Chapter 4 - Dates and Times

=
* Chapter 4 - Python Dates and Times
* 4.1 Python time - Clock Time
* 4.1.1 Python Comparing Clocks
* 4.1.2 Python Wall Clock Time
* 4.1.3 Python Monotonic Clocks
* 4.1.4 Python Processor Clock Time
* 4.1.5 Python Performance Counter
* 4.1.6 Python Time Components
* 4.1.7 Python Working with Time Zones
* 4.1.8 Python Parsing and Formatting Times
* 4.2 Python datetime - Date and Time Value Manipulation
* 4.2.1 Python Times
* 4.2.2 Python Dates
* 4.2.3 Python timedeltas
* 4.2.4 Python Date Arithmetic
* 4.2.5 Python Comparing Values
* 4.2.6 Python Combining Dates and Times
* 4.2.7 Python Formatting and Parsing
* 4.2.8 Python Time Zones
* 4.3 Python calendar - Work with Dates
* 4.3.1 Python Formatting Examples
* 4.3.2 Python Locales
* 4.3.3 Python Calculating Dates


=Chapter 5 - Mathematics

=
Chapter 5 - Python Mathematics
* 5.1 Python decimal - Fixed- and Floating-Point Math
* 5.1.1 Python Decimal
* 5.1.2 Python Formatting
* 5.1.3 Python Arithmetic
* 5.1.4 Python Special Values
* 5.1.5 Python Context
* 5.2 Python fractions - Rational Numbers
* 5.2.1 Python Creating Fraction Instances
* 5.2.2 Python Arithmetic
* 5.2.3 Python Approximating Values
* 5.3 Python random - Pseudorandom Number Generators
* 5.3.1 Python Generating Random Numbers
* 5.3.2 Python Seeding
* 5.3.3 Python Saving State
* 5.3.4 Python Random Integers
* 5.3.5 Python Picking Random Items
* 5.3.6 Python Permutations
* 5.3.7 Python Sampling
* 5.3.8 Python Multiple Simultaneous Generators
* 5.3.9 Python SystemRandom
* 5.3.10 Python Non-uniform Distributions
* 5.4 Python math - Mathematical Functions
* 5.4.1 Python Special Constants
* 5.4.2 Python Testing for Exceptional Values
* 5.4.3 Python Comparing
* 5.4.4 Python Converting Floating-Point Values to Integers
* 5.4.5 Python Alternative Representations of Floating-Point Values
* 5.4.6 Python Positive and Negative Signs
* 5.4.7 Python Commonly Used Calculations
* 5.4.8 Python Exponents and Logarithms
* 5.4.9 Python Angles
* 5.4.10 Python Trigonometry
* 5.4.11 Python Hyperbolic Functions
* 5.4.13 Python Special Functions
* 5.5 Python statistics - Statistical Calculations
* 5.5.1 Python Averages
* 5.5.2 Python Variance


=Chapter 6 - The File System

=
Chapter 6 - Python and the File System
* 6.1 Python os.path - Platform-Independent Manipulation of Filenames
* 6.1.1 Python Parsing Paths
* 6.1.2 Python Building Paths
* 6.1.3 Python Normalizing Paths
* 6.1.4 Python File Times
* 6.1.5 Python Testing Files
* 6.2 Python pathlib - File System Paths as Objects
* 6.2.1 Python Path Representations
* 6.2.2 Python Building Paths
* 6.2.3 Python Parsing Paths
* 6.2.4 Python Creating Concrete Paths
* 6.2.5 Python Directory Contents
* 6.2.6 Python Reading and Writing Files
* 6.2.7 Python Manipulating Directories and Symbolic Links
* 6.2.8 Python File Types
* 6.2.9 Python File Properties
* 6.2.10 Python Permissions
* 6.2.11 Python Deleting
* 6.3 Python glob - Filename Pattern Matching
* 6.3.1 Python Example Data
* 6.3.2 Python Wildcards
* 6.3.3 Python Single-Character Wildcard
* 6.3.4 Python Character Ranges
* 6.3.5 Python Escaping Meta-characters
* 6.4 Python fnmatch - Unix-Style Glob Pattern Matching
* 6.4.1 Python Simple Matching
* 6.4.2 Python Filtering
* 6.4.3 Python Translating Patterns
* 6.5 Python linecache - Read Text Files Efficiently
* 6.5.1 Python Test Data
* 6.5.2 Python Reading Specific Lines
* 6.5.3 Python Handling Blank Lines
* 6.5.4 Python Error Handling
* 6.5.5 Python Reading Python Source Files
* 6.6 Python tempfile - Temporary File System Objects
* 6.6.1 Python Temporary Files
* 6.6.2 Python Named Files
* 6.6.3 Python Spooled Files
* 6.6.4 Python Temporary Directories
* 6.6.5 Python Predicting Names
* 6.6.6 Python Temporary File Location
* 6.7 Python shutil - High-Level File Operations
* 6.7.1 Python Copying Files
* 6.7.2 Python Copying File Metadata
* 6.7.3 Python Working with Directory Trees
* 6.7.4 Python Finding Files
* 6.7.5 Python Archives
* 6.7.6 Python File System Space
* 6.8 Python filecmp - Compare Files
* 6.8.1 Python Example Data
* 6.8.2 Python Comparing Files
* 6.8.3 Python Comparing Directories
* 6.8.4 Python Using Differences in a Program
* 6.9 Python mmap - Memory-Map Files
* 6.9.1 Python Reading
* 6.9.2 Python Writing
* 6.9.3 Python Regular Expressions
* 6.10 Python codecs - String Encoding and Decoding
* 6.10.1 Python Unicode Primer
* 6.10.2 Python Working with Files
* 6.10.3 Python Byte Order
* 6.10.4 Python Error Handling
* 6.10.5 Python Encoding Translation
* 6.10.6 Python Non-Unicode Encodings
* 6.10.7 Python Incremental Encoding
* 6.10.8 Python Unicode Data and Network Communication
* 6.10.9 Python Defining a Custom Encoding
* 6.11 Python io - Text, Binary, and Raw Stream I/O Tools
* 6.11.1 Python In-Memory Streams
* 6.11.2 Python Wrapping Byte Streams for Text Data


=Chapter 7 - Data Persistence and Exchange

=
Chapter 7 - Python Data Persistence and Exchange
* 7.1 Python pickle - Object Serialization
* 7.1.1 Python Encoding and Decoding Data in Strings
* 7.1.2 Python Working with Streams
* 7.1.3 Python Problems Reconstructing Objects
* 7.1.4 Python Unpicklable Objects
* 7.1.5 Python Circular References
* 7.2 Python shelve - Persistent Storage of Objects
* 7.2.1 Python Creating a New Shelf
* 7.2.2 Python Writeback
* 7.2.3 Python Specific Shelf Types
* 7.3 Python dbm - Unix Key–Value Databases
* 7.3.1 Python Database Types
* 7.3.2 Python Creating a New Database
* 7.3.3 Python Opening an Existing Database
* 7.3.4 Python Error Cases
* 7.4 Python sqlite3 - Embedded Relational Database
* 7.4.1 Python Creating a Database
* 7.4.2 Python Retrieving Data
* 7.4.3 Python Query Metadata
* 7.4.4 Python Row Objects
* 7.4.5 Python Using Variables with Queries
* 7.4.6 Python Bulk Loading
* 7.4.7 Python Defining New Column Types
* 7.4.8 Python Determining Types for Columns
* 7.4.9 Python Transactions
* 7.4.10 Python Isolation Levels
* 7.4.11 Python In-Memory Databases
* 7.4.13 Python Exporting the Contents of a Database
* 7.4.13 Using Python Functions in SQL]]
* 7.4.14 Python Querying with Regular Expressions
* 7.4.15 Python Custom Aggregation
* 7.4.16 Python Threading and Connection Sharing
* 7.4.17 Python Restricting Access to Data
* 7.5 Python xml.etree.ElementTree - XML Manipulation API
* 7.5.1 Python Parsing an XML Document
* 7.5.2 Python Traversing the Parsed Tree
* 7.5.3 Python Finding Nodes in a Document
* 7.5.4 Python Parsed Node Attributes
* 7.5.5 Python Watching Events While Parsing
* 7.5.6 Python Creating a Custom Tree Builder
* 7.5.7 Python Parsing Strings
* 7.5.8 Python Building Documents With Element Nodes
* 7.5.9 Python Pretty-Printing XML
* 7.5.10 Python Setting Element Properties
* 7.5.11 Python Building Trees from Lists of Nodes
* 7.5.13 Python Serializing XML to a Stream
* 7.6 Python csv - Comma-Separated Value Files
* 7.6.1 Python Reading
* 7.6.2 Python Writing
* 7.6.3 Python Dialects
* 7.6.4 Python Using Field Names

Chapter 8 - Data Compression and Archiving

=
Chapter 8 - Python Data Compression and Archiving
* 8.1 Python zlib - GNU zlib Compression
* 8.1.1 Python Working with Data in Memory
* 8.1.2 Python Incremental Compression and Decompression
* 8.1.3 Python Mixed Content Streams
* 8.1.4 Python Checksums
* 8.1.5 Python Compressing Network Data
* 8.2 Python gzip - Read and Write GNU zip Files
* 8.2.1 Python Writing Compressed Files
* 8.2.2 Python Reading Compressed Data
* 8.2.3 Python Working with Streams
* 8.3 Python bz2 - bzip2 Compression
* 8.3.1 Python One-Shot Operations in Memory
* 8.3.2 Python Incremental Compression and Decompression
* 8.3.3 Python Mixed-Content Streams
* 8.3.4 Python Writing Compressed Files
* 8.3.5 Python Reading Compressed Files
* 8.3.6 Python Reading and Writing Unicode Data
* 8.3.7 Python Compressing Network Data
* 8.4 Python tarfile - Tar Archive Access
* 8.4.1 Python Testing Tar Files
* 8.4.2 Python Reading Metadata from an Archive
* 8.4.3 Python Extracting Files from an Archive
* 8.4.4 Python Creating New Archives
* 8.4.5 Python Using Alternative Archive Member Names
* 8.4.6 Python Writing Data from Sources Other Than Files
* 8.4.7 Python Appending to Archives
* 8.4.8 Python Working with Compressed Archives
* 8.5 Python zipfile - ZIP Archive Access
* 8.5.1 Python Testing ZIP Files
* 8.5.2 Python Reading Metadata from an Archive
* 8.5.3 Python Extracting Archived Files From an Archive
* 8.5.4 Python Creating New Archives
* 8.5.5 Python Using Alternative Archive Member Names
* 8.5.6 Python Writing Data from Sources Other Than Files
* 8.5.7 Python Writing with a ZipInfo Instance
* 8.5.8 Python Appending to Files
* 8.5.9 Python Python ZIP Archives
* 8.5.10 Python Limitations

=Chapter 9 - Cryptography

=
Chapter 9 - Python Cryptography
* 9.1 Python hashlib - Cryptographic Hashing
* 9.1.1 Python Hash Algorithms
* 9.1.2 Python Sample Data
* 9.1.3 Python MD5 Example
* 9.1.4 Python SHA1 Example
* 9.1.5 Python Creating a Hash by Name
* 9.1.6 Python Incremental Updates
* 9.2 Python hmac - Cryptographic Message Signing and Verification
* 9.2.1 Python Signing Messages
* 9.2.2 Python Alternative Digest Types
* 9.2.3 Python Binary Digests
* 9.2.4 Python Applications of Message Signatures


=Chapter 10 - Concurrency with Processes, Threads, and Coroutines

=
Chapter 10 - Python Concurrency with Processes, Threads, and Coroutines
* 10.1 Python subprocess - Spawning Additional Processes
* 10.1.1 Python Running External Command
* 10.1.2 Python Working with Pipes Directly
* 10.1.3 Python Connecting Segments of a Pipe
* 10.1.4 Python Interacting with Another Command
* 10.1.5 Python Signaling Between Processes
* 10.2 Python signal - Asynchronous System Events
* 10.2.1 Python Receiving Signals
* 10.2.2 Python Retrieving Registered Handlers
* 10.2.3 Python Sending Signals
* 10.2.4 Python Alarms
* 10.2.5 Python Ignoring Signals
* 10.2.6 Python Signals and Threads
* 10.3 Python threading - Manage Concurrent Operations Within a Process
* 10.3.1 Python Thread Objects
* 10.3.2 Python Determining the Current Thread
* 10.3.3 Python Daemon Versus Non-daemon Threads
* 10.3.4 Python Enumerating All Threads
* 10.3.5 Python Subclassing Thread
* 10.3.6 Python Timer Threads
* 10.3.7 Python Signaling Between Threads
* 10.3.8 Python Controlling Access to Resources
* 10.3.9 Python Synchronizing Threads
* 10.3.10 Python Limiting Concurrent Access to Resources
* 10.3.11 Python Thread Specific Data
* 10.4 Python multiprocessing - Manage Processes Like Threads
* 10.4.1 Python multiprocessing Basics
* 10.4.2 Python Importable Target Functions
* 10.4.3 Python Determining the Current Process
* 10.4.4 Python Daemon Processes
* 10.4.5 Python Waiting for Processes
* 10.4.6 Python Terminating Processes
* 10.4.7 Python Process Exit Status
* 10.4.8 Python Logging
* 10.4.9 Python Subclassing Process
* 10.4.10 Python Passing Messages to Processes
* 10.4.11 Python Signaling Between Processes
* 10.4.13 Python Controlling Access to Resources
* 10.4.13 Synchronizing Operations]]
* 10.4.14 Python Controlling Concurrent Access to Resources
* 10.4.15 Python Managing Shared State
* 10.4.16 Python Shared Namespaces
* 10.4.17 Python Process Pools
* 10.4.18 Python Implementing MapReduce
* 10.5 Python asyncio - Asynchronous I/O, Event Loop, and Concurrency Tools
* 10.5.1 Python Asynchronous Concurrency Concepts
* 10.5.2 Python Cooperative Multitasking with Coroutines
* 10.5.3 Python Scheduling Calls to Regular Functions
* 10.5.4 Python Producing Results Asynchronously
* 10.5.5 Python Executing Tasks Concurrently
* 10.5.6 Python Composing Coroutines with Control Structures
* 10.5.7 Python Synchronization Primitives
* 10.5.8 Python Asynchronous I/O with Protocol Class Abstractions
* 10.5.9 Python Asynchronous I/O Using Coroutines and Streams
* 10.5.10 Python Using SSL
* 10.5.11 Python Interacting with Domain Name Services
* 10.5.13 Python Working with Subprocesses
* 10.5.13 Python Receiving Unix Signals
* 10.5.14 Python Combining Coroutines with Threads and Processes
* 10.5.15 Python Debugging with asyncio
* 10.6 Python concurrent.futures - Manage Pools of Concurrent Tasks
* 10.6.1 Python Using map() with a Basic Thread Pool
* 10.6.2 Python Scheduling Individual Tasks
* 10.6.3 Python Waiting for Tasks in Any Order
* 10.6.4 Python Future Callbacks
* 10.6.5 Python Canceling Tasks
* 10.6.6 Python Exceptions in Tasks
* 10.6.7 Python Context Manager
* 10.6.8 Python Process Pools

=Chapter 11 - Networking

=
Chapter 11 - Python Networking
* 11.1 Python ipaddress - Internet Addresses
* 11.1.1 Python Addresses
* 11.1.2 Python Networks
* 11.1.3 Python Interfaces
* 11.2 Python socket - Network Communication
* 11.2.1 Python Addressing, Protocol Families, and Socket Types
* 11.2.2 Python TCP/IP Client and Server
* 11.2.3 Python User Datagram Client and Server
* 11.2.4 Python Unix Domain Sockets
* 11.2.5 Python Multicast
* 11.2.6 Python Sending Binary Data
* 11.2.7 Python Non-blocking Communication and Timeouts
* 11.3 Python selectors - I/O Multiplexing Abstractions
* 11.3.1 Python Operating Model
* 11.3.2 Python Echo Server
* 11.3.3 Python Echo Client
* 11.3.4 Python Server and Client Together
* 11.4 Python select - Wait for I/O Efficiently
* 11.4.1 Python Using select()
* 11.4.2 Python Non-blocking I/O with Timeouts
* 11.4.3 Python Using poll()
* 11.4.4 Python Platform-Specific Options
* 11.5 Python socketserver - Creating Network Servers
* 11.5.1 Python Server Types
* 11.5.2 Python Server Objects
* 11.5.3 Python Implementing a Server
* 11.5.4 Python Request Handlers
* 11.5.5 Python Echo Example
* 11.5.6 Python Threading and Forking

=Chapter 12 - The Internet

=
Chapter 12 - Python and The Internet
* 12.1 Python urllib.parse - Split URLs into Components
* 12.1.1 Python Parsing
* 12.1.2 Python Unparsing
* 12.1.3 Python Joining
* 12.1.4 Python Encoding Query Arguments
* 12.2 Python urllib.request - Network Resource Access
* 12.2.1 Python HTTP GET
* 12.2.2 Python Encoding Arguments
* 12.2.3 Python HTTP POST
* 12.2.4 Python Adding Outgoing Headers
* 12.2.5 Python Posting Form Data from a Request
* 12.2.6 Python Uploading Files
* 12.2.7 Python Creating Custom Protocol Handlers
* 12.3 Python urllib.robotparser - Internet Spider Access Control
* 12.3.1 Python robots.txt
* 12.3.2 Python Testing Access Permissions
* 12.3.3 Python Long-Lived Spiders
* 12.4 Python base64 - Encode Binary Data with ASCII
* 12.4.1 Python Base 64 Encoding
* 12.4.2 Python Base64 Decoding
* 12.4.3 Python URL-Safe Variations
* 12.4.4 Python Other Encodings
* 12.5 Python http.server - Base Classes for Implementing Web Servers
* 12.5.1 Python HTTP GET
* 12.5.2 Python HTTP POST
* 12.5.3 Python Threading and Forking
* 12.5.4 Python Handling Errors
* 12.5.5 Python Setting Headers
* 12.5.6 Python Command-Line Use
* 12.6 Python http.cookies - HTTP Cookies
* 12.6.1 Python Creating and Setting a Cookie
* 12.6.2 Python Morsels
* 12.6.3 Python Encoded Values
* 12.6.4 Python Receiving and Parsing Cookie Headers
* 12.6.5 Python Alternative Output Formats
* 12.7 Python webbrowser - Displays Web Pages
* 12.7.1 Python Simple Example
* 12.7.2 Python Windows Versus Tabs
* 12.7.3 Python Using a Specific Browser
* 12.7.4 Python BROWSER Variable
* 12.7.5 Python Command-Line Interface
* 12.8 Python uuid - Universally Unique Identifiers
* 12.8.1 Python UUID 1 - IEEE 802 MAC Address
* 12.8.2 Python UUID 3 and 5 - Name-Based Values
* 12.8.3 Python UUID 4 - Random Values
* 12.8.4 Python Working with UUID Objects
* 12.9 Python json - JavaScript Object Notation
* 12.9.1 Python Encoding and Decoding Simple Data Types
* 12.9.2 Python Human-Consumable Versus Compact Output
* 12.9.3 Python Encoding Dictionaries
* 12.9.4 Python Working with Custom Types
* 12.9.5 Python Encoder and Decoder Classes
* 12.9.6 Python Working with Streams and Files
* 12.9.7 Python Mixed Data Streams
* 12.9.8 Python JSON at the Command Line
* 12.10 Python xmlrpc.client - Client Library for XML-RPC
* 12.10.1 Python Connecting to a Server
* 12.10.2 Python Data Types
* 12.10.3 Python Passing Objects
* 12.10.4 Python Binary Data
* 12.10.5 Python Exception Handling
* 12.10.6 Python Combining Calls into One Message
* 12.11 Python xmlrpc.server - An XML-RPC Server
* 12.11.1 Python A Simple Server
* 12.11.2 Python Alternate API Names
* 12.11.3 Python Dotted API Names
* 12.11.4 Python Arbitrary API Names
* 12.11.5 Python Exposing Methods of Objects
* 12.11.6 Python Dispatching Calls
* 12.11.7 Python Introspection API


=Chapter 13 - Email

=
Chapter 13 - Python and Email
* 13.1 Python smtplib - Simple Mail Transfer Protocol Client
* 13.1.1 Python Sending an Email Message
* 13.1.2 Python Authentication and Encryption
* 13.1.3 Python Verifying an Email Address
* 13.2 Python smtpd - Sample Mail Servers
* 13.2.1 Python Mail Server Base Class
* 13.2.2 Python Debugging Server
* 13.2.3 Python Proxy Server
* 13.3 Python mailbox - Manipulate Email Archives
* 13.3.1 Python mbox
* 13.3.2 Python Maildir
* 13.3.3 Python Message Flags
* 13.3.4 Python Other Formats
* 13.4 Python imaplib - IMAP4 Client Library
* 13.4.1 Python Variations
* 13.4.2 Python Connecting to a Server
* 13.4.3 Python Example Configuration
* 13.4.4 Python Listing Mailboxes
* 13.4.5 Python Mailbox Status
* 13.4.6 Python Selecting a Mailbox
* 13.4.7 Python Searching for Messages
* 13.4.8 Python Search Criteria
* 13.4.9 Python Fetching Messages
* 13.4.10 Python Whole Messages
* 13.4.11 Python Uploading Messages
* 13.4.13 Python Moving and Copying Messages
* 13.4.13 Deleting Messages]]


=Chapter 14 - Application Building Blocks

=
Chapter 14 - Python Application Building Blocks
* 14.1 Python argparse - Command-Line Option and Argument Parsing
* 14.1.1 Python Setting Up a Parser
* 14.1.2 Python Defining Arguments
* 14.1.3 Python Parsing a Command Line
* 14.1.4 Python Simple Examples
* 14.1.5 Python Help Output
* 14.1.6 Python Parser Organization
* 14.1.7 Python Advanced Argument Processing
* 14.2 Python getopt - Command-Line Option Parsing
* 14.2.1 Python Function Arguments
* 14.2.2 Python Short-Form Options
* 14.2.3 Python Long-Form Options
* 14.2.4 Python A Complete Example
* 14.2.5 Python Abbreviating Long-Form Options
* 14.2.6 Python GNU-Style Option Parsing
* 14.2.7 Python Ending Argument Processing
* 14.3 Python readline - The GNU readline Library
* 14.3.1 Python Configuring readline
* 14.3.2 Python Completing Text
* 14.3.3 Python Accessing the Completion Buffer
* 14.3.4 Python Input History
* 14.3.5 Python Hooks
* 14.4 Python getpass - Secure Password Prompt
* 14.4.1 Python Example
* 14.4.2 Python Using getpass Without a Terminal
* 14.5 Python cmd - Line-Oriented Command Processors
* 14.5.1 Python Processing Commands
* 14.5.2 Python Command Arguments
* 14.5.3 Python Live Help
* 14.5.4 Python Auto-Completion
* 14.5.5 Python Overriding Base Class Methods
* 14.5.6 Python Configuring Cmd Through Attributes
* 14.5.7 Python Running Shell Commands
* 14.5.8 Python Alternative Inputs
* 14.5.9 Python Commands from sys.argv
* 14.6 Python shlex - Parse Shell-Style Syntaxes
* 14.6.1 Python Parsing Quoted Strings
* 14.6.2 Python Making Safe Strings for Shells
* 14.6.3 Python Embedded Comments
* 14.6.4 Python Splitting Strings into Tokens
* 14.6.5 Python Including Other Sources of Tokens
* 14.6.6 Python Controlling the Parser
* 14.6.7 Python Error Handling
* 14.6.8 Python POSIX Versus Non-POSIX Parsing
* 14.7 Python configparser - Work with Configuration Files
* 14.7.1 Python Configuration File Format
* 14.7.2 Python Reading Configuration Files
* 14.7.3 Python Accessing Configuration Settings
* 14.7.4 Python Modifying Settings
* 14.7.5 Python Saving Configuration Files
* 14.7.6 Python Option Search Path
* 14.7.7 Python Combining Values with Interpolation
* 14.8 Python logging - Report Status, Error, and Informational Messages
* 14.8.1 Python Logging Components
* 14.8.2 Python Logging in Applications Versus Libraries
* 14.8.3 Python Logging to a File
* 14.8.4 Python Rotating Log Files
* 14.8.5 Python Verbosity Levels
* 14.8.6 Python Naming Logger Instances
* 14.8.7 Python The Logging Tree
* 14.8.8 Python Integration with the warnings Module
* 14.9 Python fileinput - Command-Line Filter Framework
* 14.9.1 Python Converting M3U Files to RSS
* 14.9.2 Python Progress Metadata
* 14.9.3 Python In-Place Filtering
* 14.10 Python atexit - Program Shutdown Callbacks
* 14.10.1 Python Registering Exit Callbacks
* 14.10.2 Python Decorator Syntax
* 14.10.3 Python Canceling Callbacks
* 14.10.4 Python When Are atexit Callbacks Not Called?
* 14.10.5 Python Handling Exceptions
* 14.11 Python sched - Timed Event Scheduler
* 14.11.1 Python Running Events with a Delay
* 14.11.2 Python Overlapping Events
* 14.11.3 Python Event Priorities
* 14.11.4 Python Canceling Events


=Chapter 15 - Internationalization and Localization

=
Chapter 15 - Python Internationalization and Localization
* 15.1 Python gettext - Message Catalogs
* 15.1.1 Python Translation Workflow Overview
* 15.1.2 Python Creating Message Catalogs from Source Code
* 15.1.3 Python Finding Message Catalogs at Runtime
* 15.1.4 Python Plural Values
* 15.1.5 Python Application Versus Module Localization
* 15.1.6 Python Switching Translations
* 15.2 Python locale - Cultural Localization API
* 15.2.1 Python Probing the Current Locale
* 15.2.2 Python Currency
* 15.2.3 Python Formatting Numbers
* 15.2.4 Python Parsing Numbers
* 15.2.5 Python Dates and Times


=Chapter 16 - Developer Tools

=
Chapter 16 - Python Developer Tools
* 16.1 Python pydoc - Online Help for Modules
* 16.1.1 Python Plain Text Help
* 16.1.2 Python HTML Help
* 16.1.3 Python Interactive Help
* 16.2 Python doctest - Testing Through Documentation
* 16.2.1 Python Getting Started
* 16.2.2 Python Handling Unpredictable Output
* 16.2.3 Python Tracebacks
* 16.2.4 Python Working Around Whitespace
* 16.2.5 Python Test Locations
* 16.2.6 Python External Documentation
* 16.2.7 Python Running Tests
* 16.2.8 Python Test Context
* 16.3 Python unittest - Automated Testing Framework
* 16.3.1 Python Basic Test Structure
* 16.3.2 Python Running Tests
* 16.3.3 Python Test Outcomes
* 16.3.4 Python Asserting Truth
* 16.3.5 Python Testing Equality
* 16.3.6 Python Almost Equal?
* 16.3.7 Python Containers
* 16.3.8 Python Testing for Exceptions
* 16.3.9 Python Test Fixtures
* 16.3.10 Python Repeating Tests with Different Inputs
* 16.3.11 Python Skipping Tests
* 16.3.13 Python Ignoring Failing Tests
* 16.4 Python trace - Follow Program Flow
* 16.4.1 Python Example Program
* 16.4.2 Python Tracing Execution
* 16.4.3 Python Code Coverage
* 16.4.4 Python Calling Relationships
* 16.4.5 Python Programming Interface
* 16.4.6 Python Saving Result Data
* 16.4.7 Python Options
* 16.5 Python traceback - Exceptions and Stack Traces
* 16.5.1 Python Supporting Functions
* 16.5.2 Python Examining the Stack
* 16.5.3 Python TracebackException
* 16.5.4 Python Low-Level Exception APIs
* 16.5.5 Python Low-Level Stack APIs
* 16.6 Python cgitb - Detailed Traceback Reports
* 16.6.1 Python Standard Traceback Dumps
* 16.6.2 Python Enabling Detailed Tracebacks
* 16.6.3 Python Local Variables in Tracebacks
* 16.6.4 Python Exception Properties
* 16.6.5 Python HTML Output
* 16.6.6 Python Logging Tracebacks
* 16.7 Python pdb - Interactive Debugger
* 16.7.1 Python Starting the Debugger
* 16.7.2 Python Controlling the Debugger
* 16.7.3 Python Breakpoints
* 16.7.4 Python Changing Execution Flow
* 16.7.5 Python Customizing the Debugger with Aliases
* 16.7.6 Python Saving Configuration Settings
* 16.8 Python profile and pstats - Performance Analysis
* 16.8.1 Python Running the Profiler
* 16.8.2 Python Running in a Context
* 16.8.3 Python pstats - Saving and Working with Statistics
* 16.8.4 Python Limiting Report Contents
* 16.8.5 Python Caller/Callee Graphs
* 16.9 Python timeit - Time the Execution of Small Bits of Python Code
* 16.9.1 Python Module Contents
* 16.9.2 Python Basic Example
* 16.9.3 Python Storing Values in a Dictionary
* 16.9.4 Python From the Command Line
* 16.10 Python tabnanny - Indentation Validator
* 16.10.1 Python Running from the Command Line
* 16.11 Python compileall - Byte-Compile Source Files
* 16.11.1 Python Compiling One Directory
* 16.11.2 Python Ignoring Files
* 16.11.3 Python Compiling sys.path
* 16.11.4 Python Compiling Individual Files
* 16.11.5 Python From the Command Line
* 16.13 Python pyclbr - Class Browser
* 16.12.1 Python Scanning for Classes
* 16.12.2 Python Scanning for Functions
* 16.13 venv - Create Virtual Environments]]
* 16.13.1 Python Creating Environments
* 16.13.2 Python Contents of a Virtual Environment
* 16.13.3 Python Using Virtual Environments
* 16.14 Python ensurepip - Install the Python Package Installer
* 16.14.1 Python Installing pip


=Chapter 17 - Runtime Features

=
Chapter 17 - Python Runtime Features
* 17.1 Python site - Site-wide Configuration
* 17.1.1 Python Import Path
* 17.1.2 Python User Directories
* 17.1.3 Python Path Configuration Files
* 17.1.4 Python Customizing Site Configuration
* 17.1.5 Python Customizing User Configuration
* 17.1.6 Python Disabling the site Module
* 17.2 Python sys - System-Specific Configuration
* 17.2.1 Python Interpreter Settings
* 17.2.2 Python Runtime Environment
* 17.2.3 Python Memory Management and Limits
* 17.2.4 Python Exception Handling
* 17.2.5 Python Low-Level Thread Support
* 17.2.6 Python Modules and Imports
* 17.2.7 Python Tracing a Program As It Runs
* 17.3 Python os - Portable Access to Operating System–Specific Features
* 17.3.1 Python Examining the File System Contents
* 17.3.2 Python Managing File System Permissions
* 17.3.3 Python Creating and Deleting Directories
* 17.3.4 Python Working with Symbolic Links
* 17.3.5 Python Safely Replacing an Existing File
* 17.3.6 Python Detecting and Changing the Process Owner
* 17.3.7 Python Managing the Process Environment
* 17.3.8 Python Managing the Process Working Directory
* 17.3.9 Python Running External Commands
* 17.3.10 Python Creating Processes with os.fork()
* 17.3.11 Python Waiting for Child Processes
* 17.3.13 Python Spawning New Processes
* 17.3.13 Operating System Error Codes]]
* 17.4 Python platform - System Version Information
* 17.4.1 Python Interpreter
* 17.4.2 Python Platform
* 17.4.3 Python Operating System and Hardware Information
* 17.4.4 Python Executable Architecture
* 17.5 Python resource - System Resource Management
* 17.5.1 Python Current Usage
* 17.5.2 Python Resource Limits
* 17.6 Python gc - Garbage Collector
* 17.6.1 Python Tracing References
* 17.6.2 Python Forcing Garbage Collection
* 17.6.3 Python Finding References to Objects That Cannot Be Collected
* 17.6.4 Python Collection Thresholds and Generations
* 17.6.5 Python Debugging
* 17.7 Python sysconfig - Interpreter Compile-Time Configuration
* 17.7.1 Python Configuration Variables
* 17.7.2 Python Installation Paths
* 17.7.3 Python Python Version and Platform


=Chapter 18 - Language Tools

=
Chapter 18 - Python Language Tools
* 18.1 Python warnings - Non-fatal Alerts
* 18.1.1 Python Categories and Filtering
* 18.1.2 Python Generating Warnings
* 18.1.3 Python Filtering with Patterns
* 18.1.4 Python Repeated Warnings
* 18.1.5 Python Alternative Message Delivery Functions
* 18.1.6 Python Formatting
* 18.1.7 Python Stack Level in Warnings
* 18.2 Python abc - Abstract Base Classes
* 18.2.1 Python How ABCs Work
* 18.2.2 Python Registering a Concrete Class
* 18.2.3 Python Implementation Through Subclassing
* 18.2.4 Python Helper Base Class
* 18.2.5 Python Incomplete Implementations
* 18.2.6 Python Concrete Methods in ABCs
* 18.2.7 Python Abstract Properties
* 18.2.8 Python Abstract Class and Static Methods
* 18.3 Python dis - Python Byte-Code Disassembler
* 18.3.1 Python Basic Disassembly
* 18.3.2 Python Disassembling Functions
* 18.3.3 Python Classes
* 18.3.4 Python Source Code
* 18.3.5 Python Using Disassembly to Debug
* 18.3.6 Python Performance Analysis of Loops
* 18.3.7 Python Compiler Optimizations
* 18.4 Python inspect - Inspect Live Objects
* 18.4.1 Python Example Module
* 18.4.2 Python Inspecting Modules
* 18.4.3 Python Inspecting Classes
* 18.4.4 Python Inspecting Instances
* 18.4.5 Python Documentation Strings
* 18.4.6 Python Retrieving Source
* 18.4.7 Python Method and Function Signatures
* 18.4.8 Python Class Hierarchies
* 18.4.9 Python Method Resolution Order
* 18.4.10 Python The Stack and Frames
* 18.4.11 Python Command-Line Interface
* 19.1 Python importlib - Python’s Import Mechanism


=Chapter 19 - Modules and Packages


Chapter 19 - Python Modules and Packages
* 19.1.1 Python Example Package
* 19.1.2 Python Module Types
* 19.1.3 Python Importing Modules
* 19.1.4 Python Loaders
* 19.2 Python pkgutil - Package Utilities
* 19.2.1 Python Package Import Paths
* 19.2.2 Python Development Versions of Packages
* 19.2.3 Python Managing Paths with PKG Files
* 19.2.4 Python Nested Packages
* 19.2.5 Python Package Data
* 19.3 Python zipimport - Load Python Code from ZIP Archives
* 19.3.1 Python Example
* 19.3.2 Python Finding a Module
* 19.3.3 Python Accessing Code
* 19.3.4 Python Source
* 19.3.5 Python Packages
* 19.3.6 Python Data


=Appendix A - Porting Notes

=
Appendix A - Python Porting Notes
* A.1 Python References
* A.2 Python New Modules
* A.3 Python Renamed Modules
* A.4 Python Removed Modules
* A.4.1 Python bsddb
* A.4.2 Python commands
* A.4.3 Python compiler
* A.4.4 Python dircache
* A.4.5 Python EasyDialogs
* A.4.6 Python exceptions
* A.4.7 Python htmllib
* A.4.8 Python md5
* A.4.9 Python mimetools, MimeWriter, mimify, multifile, and rfc822
* A.4.10 Python popen2
* A.4.11 Python posixfile
* A.4.13 Python sets
* A.4.13 Python sha
* A.4.14 Python sre
* A.4.15 Python statvfs
* A.4.16 Python thread
* A.4.17 Python user
* A.5 Python Deprecated Modules
* A.5.1 Python asyncore and asynchat
* A.5.2 Python formatter
* A.5.3 Python imp
* A.5.4 Python optparse
* A.6 Python Summary of Changes to Modules
* A.6.1 Python abc
* A.6.2 Python anydbm
* A.6.3 Python argparse
* A.6.4 Python array
* A.6.5 Python atexit
* A.6.6 Python base64
* A.6.7 Python bz2
* A.6.8 Python collections
* A.6.9 Python comands
* A.6.10 Python configparser
* A.6.11 Python contextlib
* A.6.13 Python csv
* A.6.13 Python datetime
* A.6.14 Python decimal
* A.6.15 Python fractions
* A.6.16 Python gc
* A.6.17 Python gettext
* A.6.18 Python glob
* A.6.19 Python http.cookies
* A.6.20 Python imaplib
* A.6.21 Python inspect
* A.6.22 Python itertools
* A.6.23 Python json
* A.6.24 Python locale
* A.6.25 Python logging
* A.6.26 Python mailbox
* A.6.27 Python mmap
* A.6.28 Python operator
* A.6.29 Python os
* A.6.30 Python os.path
* A.6.31 Python pdb
* A.6.32 Python pickle
* A.6.33 - Python pipes
* A.6.34 - Python platform
* A.6.35 - Python random
* A.6.36 - Python re
* A.6.37 - Python shelve
* A.6.38 - Python signal
* A.6.39 - Python socket
* A.6.40 - Python socketserver
* A.6.41 - Python string
* A.6.42 - Python struct
* A.6.43 - Python subprocess
* A.6.44 - Python sys
* A.6.45 - Python threading
* A.6.46 - Python time
* A.6.47 - Python unittest
* A.6.48 - Python UserDict, UserList, and UserString
* A.6.49 - Python uuid
* A.6.50 - Python whichdb
* A.6.51 - Python xml.etree.ElementTree
* A.6.52 - Python zipimport


=Appendix B - Outside of the Standard Library

=
Appendix B - Python Outside of the Standard Library
* B.1 Python Text
* B.2 Python Algorithms
* B.3 Python Dates and Times
* B.4 Python Mathematics
* B.5 Python Data Persistence and Exchange
* B.6 Python Cryptography
* B.7 Python Concurrency with Processes, Threads, and Coroutines
* B.8 Python The Internet
* B.9 Python Email
* B.10 Python Application Building Blocks
* B.11 Python Developer Tools

=Index of Python Modules

=
* Index of Python Modules


* Python Index - Index of Python




How This Book Is Organized



"This book supplements the comprehensive reference guide (available at http://docs.python.org), providing fully functional example programs to demonstrate the features described there. The modules are grouped into chapters to make it easy to find an individual module for reference and browse by subject for more leisurely exploration. In the unlikely event that you want to read it through from cover to cover, it is organized to minimize “forward references” to modules not yet covered, although it was not possible to eliminate them entirely."





Downloading the Example Code



The original versions of the articles and the sample code are available at https://pymotw.com/3/. Errata for the book can be found on the author’s website: https://doughellmann.com/blog/the-python-3-standard-library-by-example/.

----

Register


Register your copy of The Python 3 Standard Library by Example at informit.com for convenient access to downloads, updates, and corrections as they become available. To start the registration process, go to informit.com/register and log in or create an account. Enter the product ISBN (9780134291055) and click Submit. Once the process is complete, you will find any available bonus content under “Registered Products.”



Acknowledgments



"This book would not have come into being without the contributions and support of many other people.

I was first introduced to Python around 1997 by Dick Wall, while we were working together on GIS software at ERDAS. I remember being simultaneously happy that I had found a new tool language that was so easy to use, and sad that the company did not let us use it for “real work.” I have used Python extensively at all of my subsequent jobs, and I have Dick to thank for the many happy hours I have spent working on software since then.

The Python core development team has created a robust ecosystem of language, tools, and libraries that continue to grow in popularity and find new application areas. Without the continued investment in time and resources they have given us, we would all still be spending our energy reinventing wheel after wheel.

The material in this book started out as a series of blog posts. Without the exceptionally positive response of the readers of the blog, those articles would never have been updated to work with Python 3, and this new book would not exist. Each of those posts has been reviewed and commented on by members of the Python community, with corrections, suggestions, and questions that led to the refinements and improvements that appear in this book. Thank you all for reading along week after week, and contributing your time and attention.

The technical reviewers for the book—Diana Clarke, Ian Cordasco, Mark McClain, Paul McLanahan, and Ryan Petrello—spent many hours looking for issues with the example code and accompanying explanations. Thanks to their diligence, the resulting text is stronger than I could have produced on my own.

Jim Baker provided helpful insight when documenting the readline module, especially by pointing out the gnureadline package for platforms where GNU libraries are old or not installed by default.

Patrick Kettner helped to collect the output for the platform module examples on Windows.

A special thanks goes to the editors, production staff, and marketing team at Addison-Wesley for all of their hard work and assistance in helping me realize my vision for this book and make it a success.

Finally, I want to thank my wife, Theresa Flynn, who has gracefully accepted all of the lost nights and weekends over the course of this new project. Thank you for your advice, encouragement, and support."





About the Author


"Doug Hellmann is currently employed by Red Hat to work on OpenStack. He is on the ddg>OpenStack Technical Committee and contributes to many aspects of the project. He has been programming in Python since version ddg>Python version 1.4, and has worked on a variety of Unix and non-Unix platforms for projects in fields such as mapping, ddg>medical news publishing, banking, and data center automation. Doug is a Fellow of the Python Software Foundation, and served as its Communications Director from 2010 to 2012. After a year as a regular columnist for ddg>Python Magazine, he served as Editor-in-Chief from 2008 to 2009. Between 2007 and 2011, Doug published the popular Python Module of the Week series on his Python blog, and an earlier version of this book for Python 2 called The Python Standard Library by Example. He lives in wp>Athens, Georgia." Fair Use Source: B072QZZDV7





Fair Use Sources


* Fair Use Source: B072QZZDV7
* https://doughellmann.com/books/the-python-3-standard-library-by-example
* archive>Python 3 Standard Library by Example for Archive Access for Fair Use Preservation, quoting, paraphrasing, excerpting and/or commenting upon

{{navbar_python_standard_library}}

{{navbar_python}}

{{navbar_footer}}