- Whetting Your Appetite
- Using the Python Interpreter
- An Informal Introduction to Python
- More Control Flow Tools
- Data Structures
- Modules
- Input and Output
- Errors and Exceptions
- Classes
- Brief Tour of the Standard Library
- Brief Tour of the Standard Library – Part II
- What Now?
- Interactive Input Editing and History Substitution
- Floating Point Arithmetic: Issues and Limitations
- Introduction
- Built-in Functions
- Non-essential Built-in Functions
- Built-in Constants
- Built-in Objects
- Built-in Types
- Built-in Exceptions
- String Services
- string — Common string operations
- re — Regular expression operations
- struct — Interpret strings as packed binary data
- difflib — Helpers for computing deltas
- StringIO — Read and write strings as files
- cStringIO — Faster version of StringIO
- textwrap — Text wrapping and filling
- codecs — Codec registry and base classes
- unicodedata — Unicode Database
- stringprep — Internet String Preparation
- fpformat — Floating point conversions
- Data Types
- datetime — Basic date and time types
- calendar — General calendar-related functions
- collections — High-performance container datatypes
- heapq — Heap queue algorithm
- bisect — Array bisection algorithm
- array — Efficient arrays of numeric values
- sets — Unordered collections of unique elements
- sched — Event scheduler
- mutex — Mutual exclusion support
- queue — A synchronized queue class
- weakref — Weak references
- UserDict — Class wrapper for dictionary objects
- UserList — Class wrapper for list objects
- UserString — Class wrapper for string objects
- types — Names for built-in types
- new — Creation of runtime internal objects
- copy — Shallow and deep copy operations
- pprint — Data pretty printer
- repr — Alternate repr() implementation
- Numeric and Mathematical Modules
- numbers — Numeric abstract base classes
- math — Mathematical functions
- cmath — Mathematical functions for complex numbers
- decimal — Decimal fixed point and floating point arithmetic
- fractions — Rational numbers
- random — Generate pseudo-random numbers
- itertools — Functions creating iterators for efficient looping
- functools — Higher order functions and operations on callable objects
- operator — Standard operators as functions
- File and Directory Access
- os.path — Common pathname manipulations
- fileinput — Iterate over lines from multiple input streams
- stat — Interpreting stat() results
- statvfs — Constants used with os.statvfs()
- filecmp — File and Directory Comparisons
- tempfile — Generate temporary files and directories
- glob — Unix style pathname pattern expansion
- fnmatch — Unix filename pattern matching
- linecache — Random access to text lines
- shutil — High-level file operations
- dircache — Cached directory listings
- macpath — Mac OS 9 path manipulation functions
- Data Persistence
- pickle — Python object serialization
- cPickle — A faster pickle
- copy_reg — Register pickle support functions
- shelve — Python object persistence
- marshal — Internal Python object serialization
- anydbm — Generic access to DBM-style databases
- whichdb — Guess which DBM module created a database
- dbm — Simple “database” interface
- gdbm — GNU’s reinterpretation of dbm
- dbhash — DBM-style interface to the BSD database library
- bsddb — Interface to Berkeley DB library
- dumbdbm — Portable DBM implementation
- sqlite3 — DB-API 2.0 interface for SQLite databases
- Data Compression and Archiving
- File Formats
- Cryptographic Services
- Generic Operating System Services
- os — Miscellaneous operating system interfaces
- io — Core tools for working with streams
- time — Time access and conversions
- optparse — More powerful command line option parser
- getopt — Parser for command line options
- logging — Logging facility for Python
- getpass — Portable password input
- curses — Terminal handling for character-cell displays
- curses.textpad — Text input widget for curses programs
- curses.wrapper — Terminal handler for curses programs
- curses.ascii — Utilities for ASCII characters
- curses.panel — A panel stack extension for curses.
- platform — Access to underlying platform’s identifying data.
- errno — Standard errno system symbols
- ctypes — A foreign function library for Python.
- Optional Operating System Services
- select — Waiting for I/O completion
- threading — Higher-level threading interface
- thread — Multiple threads of control
- dummy_threading — Drop-in replacement for the threading module
- dummy_thread — Drop-in replacement for the thread module
- multiprocessing — Process-based “threading” interface
- mmap — Memory-mapped file support
- readline — GNU readline interface
- rlcompleter — Completion function for GNU readline
- Interprocess Communication and Networking
- Internet Data Handling
- email — An email and MIME handling package
- json — JSON encoder and decoder
- mailcap — Mailcap file handling
- mailbox — Manipulate mailboxes in various formats
- mhlib — Access to MH mailboxes
- mimetools — Tools for parsing MIME messages
- mimetypes — Map filenames to MIME types
- MimeWriter — Generic MIME file writer
- mimify — MIME processing of mail messages
- multifile — Support for files containing distinct parts
- rfc822 — Parse RFC 2822 mail headers
- base64 — RFC 3548: Base16, Base32, Base64 Data Encodings
- binhex — Encode and decode binhex4 files
- binascii — Convert between binary and ASCII
- quopri — Encode and decode MIME quoted-printable data
- uu — Encode and decode uuencode files
- Structured Markup Processing Tools
- HTMLParser — Simple HTML and XHTML parser
- sgmllib — Simple SGML parser
- htmllib — A parser for HTML documents
- htmlentitydefs — Definitions of HTML general entities
- xml.parsers.expat — Fast XML parsing using Expat
- xml.dom — The Document Object Model API
- xml.dom.minidom — Lightweight DOM implementation
- xml.dom.pulldom — Support for building partial DOM trees
- xml.sax — Support for SAX2 parsers
- xml.sax.handler — Base classes for SAX handlers
- xml.sax.saxutils — SAX Utilities
- xml.sax.xmlreader — Interface for XML parsers
- xml.etree.ElementTree — The ElementTree XML API
- Internet Protocols and Support
- webbrowser — Convenient Web-browser controller
- cgi — Common Gateway Interface support.
- cgitb — Traceback manager for CGI scripts
- wsgiref — WSGI Utilities and Reference Implementation
- urllib — Open arbitrary resources by URL
- urllib2 — extensible library for opening URLs
- httplib — HTTP protocol client
- ftplib — FTP protocol client
- poplib — POP3 protocol client
- imaplib — IMAP4 protocol client
- nntplib — NNTP protocol client
- smtplib — SMTP protocol client
- smtpd — SMTP Server
- telnetlib — Telnet client
- uuid — UUID objects according to RFC 4122
- urlparse — Parse URLs into components
- SocketServer — A framework for network servers
- BaseHTTPServer — Basic HTTP server
- SimpleHTTPServer — Simple HTTP request handler
- CGIHTTPServer — CGI-capable HTTP request handler
- cookielib — Cookie handling for HTTP clients
- Cookie — HTTP state management
- xmlrpclib — XML-RPC client access
- SimpleXMLRPCServer — Basic XML-RPC server
- DocXMLRPCServer — Self-documenting XML-RPC server
- Multimedia Services
- audioop — Manipulate raw audio data
- imageop — Manipulate raw image data
- aifc — Read and write AIFF and AIFC files
- sunau — Read and write Sun AU files
- wave — Read and write WAV files
- chunk — Read IFF chunked data
- colorsys — Conversions between color systems
- imghdr — Determine the type of an image
- sndhdr — Determine type of sound file
- ossaudiodev — Access to OSS-compatible audio devices
- Internationalization
- Program Frameworks
- Graphical User Interfaces with Tk
- Development Tools
- Debugging and Profiling
- Python Runtime Services
- sys — System-specific parameters and functions
- __builtin__ — Built-in objects
- future_builtins — Python 3 builtins
- __main__ — Top-level script environment
- warnings — Warning control
- contextlib — Utilities for with-statement contexts.
- abc — Abstract Base Classes
- atexit — Exit handlers
- traceback — Print or retrieve a stack traceback
- __future__ — Future statement definitions
- gc — Garbage Collector interface
- inspect — Inspect live objects
- site — Site-specific configuration hook
- user — User-specific configuration hook
- fpectl — Floating point exception control
- Custom Python Interpreters
- Restricted Execution
- Importing Modules
- Python Language Services
- parser — Access Python parse trees
- Abstract Syntax Trees
- symtable — Access to the compiler’s symbol tables
- symbol — Constants used with Python parse trees
- token — Constants used with Python parse trees
- keyword — Testing for Python keywords
- tokenize — Tokenizer for Python source
- tabnanny — Detection of ambiguous indentation
- pyclbr — Python class browser support
- py_compile — Compile Python source files
- compileall — Byte-compile Python libraries
- dis — Disassembler for Python bytecode
- pickletools — Tools for pickle developers.
- distutils — Building and installing Python modules
- Python compiler package
- Miscellaneous Services
- MS Windows Specific Services
- Unix Specific Services
- posix — The most common POSIX system calls
- pwd — The password database
- spwd — The shadow password database
- grp — The group database
- crypt — Function to check Unix passwords
- dl — Call C functions in shared objects
- termios — POSIX style tty control
- tty — Terminal control functions
- pty — Pseudo-terminal utilities
- fcntl — The fcntl() and ioctl() system calls
- pipes — Interface to shell pipelines
- posixfile — File-like objects with locking support
- resource — Resource usage information
- nis — Interface to Sun’s NIS (Yellow Pages)
- syslog — Unix syslog library routines
- commands — Utilities for running commands
- Mac OS X specific services
- ic — Access to the Mac OS X Internet Config
- MacOS — Access to Mac OS interpreter features
- macostools — Convenience routines for file manipulation
- findertools — The finder‘s Apple Events interface
- EasyDialogs — Basic Macintosh dialogs
- FrameWork — Interactive application framework
- autoGIL — Global Interpreter Lock handling in event loops
- Mac OS Toolbox Modules
- ColorPicker — Color selection dialog
- MacPython OSA Modules
- SGI IRIX Specific Services
- al — Audio functions on the SGI
- AL — Constants used with the al module
- cd — CD-ROM access on SGI systems
- fl — FORMS library for graphical user interfaces
- FL — Constants used with the fl module
- flp — Functions for loading stored FORMS designs
- fm — Font Manager interface
- gl — Graphics Library interface
- DEVICE — Constants used with the gl module
- GL — Constants used with the gl module
- imgfile — Support for SGI imglib files
- jpeg — Read and write JPEG files
- SunOS Specific Services
- Undocumented Modules
- Extending Python with C or C++
- A Simple Example
- Intermezzo: Errors and Exceptions
- Back to the Example
- The Module’s Method Table and Initialization Function
- Compilation and Linkage
- Calling Python Functions from C
- Extracting Parameters in Extension Functions
- Keyword Parameters for Extension Functions
- Building Arbitrary Values
- Reference Counts
- Writing Extensions in C++
- Providing a C API for an Extension Module
- Defining New Types
- Building C and C++ Extensions with distutils
- Building C and C++ Extensions on Windows
- Embedding Python in Another Application
- __builtin__
- __future__
- __main__
- _winreg (Windows)
- abc
- aepack (Mac)
- aetools (Mac)
- aetypes (Mac)
- aifc
- al (IRIX)
- AL (IRIX)
- anydbm
- applesingle (Mac)
- array
- ast
- asynchat
- asyncore
- atexit
- audioop
- autoGIL (Mac)
- base64
- BaseHTTPServer
- Bastion
- bdb
- binascii
- binhex
- bisect
- bsddb
- buildtools (Mac)
- bz2
- calendar
- Carbon.AE (Mac)
- Carbon.AH (Mac)
- Carbon.App (Mac)
- Carbon.CarbonEvt (Mac)
- Carbon.CF (Mac)
- Carbon.CG (Mac)
- Carbon.Cm (Mac)
- Carbon.Ctl (Mac)
- Carbon.Dlg (Mac)
- Carbon.Evt (Mac)
- Carbon.Fm (Mac)
- Carbon.Folder (Mac)
- Carbon.Help (Mac)
- Carbon.List (Mac)
- Carbon.Menu (Mac)
- Carbon.Mlte (Mac)
- Carbon.Qd (Mac)
- Carbon.Qdoffs (Mac)
- Carbon.Qt (Mac)
- Carbon.Res (Mac)
- Carbon.Scrap (Mac)
- Carbon.Snd (Mac)
- Carbon.TE (Mac)
- Carbon.Win (Mac)
- cd (IRIX)
- cfmfile (Mac)
- cgi
- CGIHTTPServer
- cgitb
- chunk
- cmath
- cmd
- code
- codecs
- codeop
- collections
- ColorPicker (Mac)
- colorsys
- commands (Unix)
- compileall
- compiler
- compiler.ast
- compiler.visitor
- ConfigParser
- contextlib
- Cookie
- cookielib
- copy
- copy_reg
- cPickle
- cProfile
- crypt (Unix)
- cStringIO
- csv
- ctypes
- curses
- curses.ascii
- curses.panel
- curses.textpad
- curses.wrapper
- datetime
- dbhash
- dbm (Unix)
- decimal
- DEVICE (IRIX)
- difflib
- dircache
- dis
- distutils
- distutils.archive_util
- distutils.bcppcompiler
- distutils.ccompiler
- distutils.cmd
- distutils.command
- distutils.command.bdist
- distutils.command.bdist_dumb
- distutils.command.bdist_msi
- distutils.command.bdist_packager
- distutils.command.bdist_rpm
- distutils.command.bdist_wininst
- distutils.command.build
- distutils.command.build_clib
- distutils.command.build_ext
- distutils.command.build_py
- distutils.command.build_scripts
- distutils.command.clean
- distutils.command.config
- distutils.command.install
- distutils.command.install_data
- distutils.command.install_headers
- distutils.command.install_lib
- distutils.command.install_scripts
- distutils.command.register
- distutils.command.sdist
- distutils.core
- distutils.cygwinccompiler
- distutils.debug
- distutils.dep_util
- distutils.dir_util
- distutils.dist
- distutils.emxccompiler
- distutils.errors
- distutils.extension
- distutils.fancy_getopt
- distutils.file_util
- distutils.filelist
- distutils.log
- distutils.msvccompiler
- distutils.mwerkscompiler
- distutils.spawn
- distutils.sysconfig
- distutils.text_file
- distutils.unixccompiler
- distutils.util
- distutils.version
- dl (Unix)
- doctest
- DocXMLRPCServer
- dumbdbm
- dummy_thread
- dummy_threading
- EasyDialogs (Mac)
- email.charset
- email.encoders
- email.errors
- email.generator
- email.header
- email.iterators
- email.message
- email.mime
- email.parser
- email.utils
- encodings.idna
- encodings.utf_8_sig
- errno
- exceptions
- fcntl (Unix)
- filecmp
- fileinput
- findertools (Mac)
- FL (IRIX)
- fl (IRIX)
- flp (IRIX)
- fm (IRIX)
- fnmatch
- formatter
- fpectl (Unix)
- fpformat
- fractions
- FrameWork (Mac)
- ftplib
- functools
- future_builtins
- gc
- gdbm (Unix)
- gensuitemodule (Mac)
- getopt
- getpass
- gettext
- gl (IRIX)
- GL (IRIX)
- glob
- grp (Unix)
- gzip
- hashlib
- heapq
- hmac
- hotshot
- hotshot.stats
- htmlentitydefs
- htmllib
- HTMLParser
- httplib
- ic (Mac)
- icopen (Mac)
- imageop
- imaplib
- imgfile (IRIX)
- imghdr
- imp
- imputil
- inspect
- io
- itertools
- jpeg (IRIX)
- json
- keyword
- lib2to3
- linecache
- locale
- logging
- macerrors (Mac)
- MacOS (Mac)
- macostools (Mac)
- macpath
- macresource (Mac)
- mailbox
- mailcap
- marshal
- math
- md5
- mhlib
- mimetools
- mimetypes
- MimeWriter
- mimify
- MiniAEFrame (Mac)
- mmap
- modulefinder
- msilib (Windows)
- msvcrt (Windows)
- multifile
- multiprocessing
- multiprocessing.connection
- multiprocessing.dummy
- multiprocessing.managers
- multiprocessing.pool
- multiprocessing.sharedctypes
- mutex
- Nav (Mac)
- netrc
- new
- nis (Unix)
- nntplib
- numbers
- operator
- optparse
- os
- os.path
- ossaudiodev (Linux, FreeBSD)
- parser
- pdb
- pickle
- pickletools
- pipes (Unix)
- PixMapWrapper (Mac)
- pkgutil
- platform
- plistlib
- popen2
- poplib
- posix (Unix)
- posixfile (Unix)
- pprint
- pstats
- pty (IRIX, Linux)
- pwd (Unix)
- py_compile
- pyclbr
- pydoc
- Queue
- quopri
- random
- re
- readline (Unix)
- repr
- resource (Unix)
- rexec
- rfc822
- rlcompleter
- robotparser
- runpy
- sched
- ScrolledText (Tk)
- select
- sets
- sgmllib
- sha
- shelve
- shlex
- shutil
- signal
- SimpleHTTPServer
- SimpleXMLRPCServer
- site
- smtpd
- smtplib
- sndhdr
- socket
- SocketServer
- spwd (Unix)
- sqlite3
- ssl
- stat
- statvfs
- string
- StringIO
- stringprep
- struct
- subprocess
- sunau
- sunaudiodev (SunOS)
- SUNAUDIODEV (SunOS)
- symbol
- symtable
- sys
- syslog (Unix)
- tabnanny
- tarfile
- telnetlib
- tempfile
- termios (Unix)
- test
- test.test_support
- textwrap
- thread
- threading
- time
- timeit
- Tix
- Tkinter
- token
- tokenize
- trace
- traceback
- tty (Unix)
- turtle
- types
- unicodedata
- unittest
- urllib
- urllib2
- urlparse
- user
- UserDict
- UserList
- UserString
- uu
- uuid
- videoreader (Mac)
- W (Mac)
- warnings
- wave
- weakref
- webbrowser
- whichdb
- winsound (Windows)
- wsgiref
- wsgiref.handlers
- wsgiref.headers
- wsgiref.simple_server
- wsgiref.util
- wsgiref.validate
- xdrlib
- xml.dom
- xml.dom.minidom
- xml.dom.pulldom
- xml.etree.ElementTree
- xml.parsers.expat
- xml.sax
- xml.sax.handler
- xml.sax.saxutils
- xml.sax.xmlreader
- xmlrpclib
- zipfile
- zipimport
- zlib