• Tut
  • Ref
  • Lib
  • Api
  • Ext
  • Mod
  • image-search

3.0.1

  • Whetting Your Appetite
  • image-plusUsing the Python Interpreter
    • image-plusInvoking the Interpreter
      • Argument Passing
      • Interactive Mode
    • image-plusThe Interpreter and Its Environment
      • Error Handling
      • Executable Python Scripts
      • Source Code Encoding
      • The Interactive Startup File
  • image-plusAn Informal Introduction to Python
    • image-plusUsing Python as a Calculator
      • Numbers
      • Strings
      • About Unicode
      • Lists
    • First Steps Towards Programming
  • image-plusMore Control Flow Tools
    • if Statements
    • for Statements
    • The range() Function
    • break and continue Statements, and else Clauses on Loops
    • pass Statements
    • Defining Functions
    • image-plusMore on Defining Functions
      • Default Argument Values
      • Keyword Arguments
      • Arbitrary Argument Lists
      • Unpacking Argument Lists
      • Lambda Forms
      • Documentation Strings
    • Intermezzo: Coding Style
  • image-plusData Structures
    • image-plusMore on Lists
      • Using Lists as Stacks
      • Using Lists as Queues
      • List Comprehensions
      • Nested List Comprehensions
    • The del statement
    • Tuples and Sequences
    • Sets
    • Dictionaries
    • Looping Techniques
    • More on Conditions
    • Comparing Sequences and Other Types
  • image-plusModules
    • image-plusMore on Modules
      • Executing modules as scripts
      • The Module Search Path
      • “Compiled” Python files
    • Standard Modules
    • The dir() Function
    • image-plusPackages
      • Importing * From a Package
      • Intra-package References
      • Packages in Multiple Directories
  • image-plusInput and Output
    • image-plusFancier Output Formatting
      • Old string formatting
    • image-plusReading and Writing Files
      • Methods of File Objects
      • The pickle Module
  • image-plusErrors and Exceptions
    • Syntax Errors
    • Exceptions
    • Handling Exceptions
    • Raising Exceptions
    • User-defined Exceptions
    • Defining Clean-up Actions
    • Predefined Clean-up Actions
  • image-plusClasses
    • A Word About Terminology
    • image-plusPython Scopes and Name Spaces
      • Scopes and Namespaces Example
    • image-plusA First Look at Classes
      • Class Definition Syntax
      • Class Objects
      • Instance Objects
      • Method Objects
    • Random Remarks
    • image-plusInheritance
      • Multiple Inheritance
    • Private Variables
    • Odds and Ends
    • Exceptions Are Classes Too
    • Iterators
    • Generators
    • Generator Expressions
  • image-plusBrief Tour of the Standard Library
    • Operating System Interface
    • File Wildcards
    • Command Line Arguments
    • Error Output Redirection and Program Termination
    • String Pattern Matching
    • Mathematics
    • Internet Access
    • Dates and Times
    • Data Compression
    • Performance Measurement
    • Quality Control
    • Batteries Included
  • image-plusBrief Tour of the Standard Library – Part II
    • Output Formatting
    • Templating
    • Working with Binary Data Record Layouts
    • Multi-threading
    • Logging
    • Weak References
    • Tools for Working with Lists
    • Decimal Floating Point Arithmetic
  • What Now?
  • image-plusInteractive Input Editing and History Substitution
    • Line Editing
    • History Substitution
    • Key Bindings
    • Commentary
  • image-plusFloating Point Arithmetic: Issues and Limitations
    • Representation Error
  • image-plusIntroduction
    • Alternate Implementations
    • Notation
  • image-plusLexical analysis
    • Line structure
    • Other tokens
    • Identifiers and keywords
    • Literals
    • Operators
    • Delimiters
  • image-plusData model
    • Objects, values and types
    • The standard type hierarchy
    • Special method names
  • image-plusExecution model
    • Naming and binding
    • Exceptions
  • image-plusExpressions
    • Arithmetic conversions
    • Atoms
    • Primaries
    • The power operator
    • Unary arithmetic operations
    • Binary arithmetic operations
    • Shifting operations
    • Binary bitwise operations
    • Comparisons
    • Boolean operations
    • Lambdas
    • Expression lists
    • Evaluation order
    • Summary
  • image-plusSimple statements
    • Expression statements
    • Assignment statements
    • The assert statement
    • The pass statement
    • The del statement
    • The return statement
    • The yield statement
    • The raise statement
    • The break statement
    • The continue statement
    • The import statement
    • The global statement
    • The nonlocal statement
  • image-plusCompound statements
    • The if statement
    • The while statement
    • The for statement
    • The try statement
    • The with statement
    • Function definitions
    • Class definitions
  • image-plusTop-level components
    • Complete Python programs
    • File input
    • Interactive input
    • Expression input
  • Full Grammar specification
  • Introduction
  • Built-in Functions
  • image-plusBuilt-in Constants
    • Constants added by the site module
  • Built-in Objects
  • image-plusBuilt-in Types
    • Truth Value Testing
    • Boolean Operations — and, or, not
    • Comparisons
    • Numeric Types — int, float, complex
    • Iterator Types
    • Sequence Types — str, bytes, bytearray, list, tuple, range
    • Set Types — set, frozenset
    • Mapping Types — dict
    • File Objects
    • memoryview Types
    • Context Manager Types
    • Other Built-in Types
    • Special Attributes
  • Built-in Exceptions
  • image-plusString Services
    • string — Common string operations
    • re — Regular expression operations
    • struct — Interpret bytes as packed binary data
    • difflib — Helpers for computing deltas
    • textwrap — Text wrapping and filling
    • codecs — Codec registry and base classes
    • unicodedata — Unicode Database
    • stringprep — Internet String Preparation
  • image-plusData Types
    • datetime — Basic date and time types
    • calendar — General calendar-related functions
    • collections — Container datatypes
    • heapq — Heap queue algorithm
    • bisect — Array bisection algorithm
    • array — Efficient arrays of numeric values
    • sched — Event scheduler
    • queue — A synchronized queue class
    • weakref — Weak references
    • types — Names for built-in types
    • copy — Shallow and deep copy operations
    • pprint — Data pretty printer
    • reprlib — Alternate repr() implementation
  • image-plusNumeric and Mathematical Modules
    • numbers — Numeric abstract base classes
    • math — Mathematical functions
    • Constants
    • 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
  • image-plusFile and Directory Access
    • os.path — Common pathname manipulations
    • fileinput — Iterate over lines from multiple input streams
    • stat — Interpreting stat() results
    • 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
    • macpath — Mac OS 9 path manipulation functions
  • image-plusData Persistence
    • pickle — Python object serialization
    • copyreg — Register pickle support functions
    • shelve — Python object persistence
    • marshal — Internal Python object serialization
    • dbm — Interfaces to Unix “databases”
    • sqlite3 — DB-API 2.0 interface for SQLite databases
  • image-plusData Compression and Archiving
    • zlib — Compression compatible with gzip
    • gzip — Support for gzip files
    • bz2 — Compression compatible with bzip2
    • zipfile — Work with ZIP archives
    • tarfile — Read and write tar archive files
  • image-plusFile Formats
    • csv — CSV File Reading and Writing
    • configparser — Configuration file parser
    • netrc — netrc file processing
    • xdrlib — Encode and decode XDR data
    • plistlib — Generate and parse Mac OS X .plist files
  • image-plusCryptographic Services
    • hashlib — Secure hashes and message digests
    • hmac — Keyed-Hashing for Message Authentication
  • image-plusGeneric 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.
  • image-plusOptional Operating System Services
    • select — Waiting for I/O completion
    • threading — Higher-level threading interface
    • dummy_threading — Drop-in replacement for the threading module
    • _thread — Low-level threading API
    • _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
  • image-plusInterprocess Communication and Networking
    • subprocess — Subprocess management
    • socket — Low-level networking interface
    • ssl — SSL wrapper for socket objects
    • signal — Set handlers for asynchronous events
    • asyncore — Asynchronous socket handler
    • asynchat — Asynchronous socket command/response handler
  • image-plusInternet Data Handling
    • email — An email and MIME handling package
    • json — JSON encoder and decoder
    • mailcap — Mailcap file handling
    • mailbox — Manipulate mailboxes in various formats
    • mimetypes — Map filenames to MIME types
    • 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
  • image-plusStructured Markup Processing Tools
    • html.parser — Simple HTML and XHTML parser
    • html.entities — 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
  • image-plusInternet 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.request — extensible library for opening URLs
    • urllib.response — Response classes used by urllib.
    • urllib.parse — Parse URLs into components
    • urllib.error — Exception classes raised by urllib.request
    • urllib.robotparser — Parser for robots.txt
    • http.client — 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
    • socketserver — A framework for network servers
    • http.server — HTTP servers
    • http.cookies — HTTP state management
    • http.cookiejar — Cookie handling for HTTP clients
    • xmlrpc.client — XML-RPC client access
    • xmlrpc.server — Basic XML-RPC servers
  • image-plusMultimedia Services
    • audioop — Manipulate raw audio 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
  • image-plusInternationalization
    • gettext — Multilingual internationalization services
    • locale — Internationalization services
  • image-plusProgram Frameworks
    • cmd — Support for line-oriented command interpreters
    • shlex — Simple lexical analysis
  • image-plusGraphical User Interfaces with Tk
    • tkinter — Python interface to Tcl/Tk
    • tkinter.tix — Extension widgets for Tk
    • tkinter.scrolledtext — Scrolled Text Widget
    • turtle — Turtle graphics for Tk
    • IDLE
    • Other Graphical User Interface Packages
  • image-plusDevelopment Tools
    • pydoc — Documentation generator and online help system
    • doctest — Test interactive Python examples
    • unittest — Unit testing framework
    • 2to3 - Automated Python 2 to 3 code translation
    • test — Regression tests package for Python
    • test.support — Utility functions for tests
  • image-plusDebugging and Profiling
    • bdb — Debugger framework
    • pdb — The Python Debugger
    • Debugger Commands
    • The Python Profilers
    • timeit — Measure execution time of small code snippets
    • trace — Trace or track Python statement execution
  • image-plusPython Runtime Services
    • sys — System-specific parameters and functions
    • builtins — Built-in objects
    • __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
    • fpectl — Floating point exception control
  • image-plusCustom Python Interpreters
    • code — Interpreter base classes
    • codeop — Compile Python code
  • image-plusImporting Modules
    • imp — Access the import internals
    • zipimport — Import modules from Zip archives
    • pkgutil — Package extension utility
    • modulefinder — Find modules used by a script
    • runpy — Locating and executing Python modules
  • image-plusPython 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
  • image-plusMiscellaneous Services
    • formatter — Generic output formatting
  • image-plusMS Windows Specific Services
    • msilib — Read and write Microsoft Installer files
    • msvcrt – Useful routines from the MS VC++ runtime
    • winreg – Windows registry access
    • winsound — Sound-playing interface for Windows
  • image-plusUnix 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
    • 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
    • resource — Resource usage information
    • nis — Interface to Sun’s NIS (Yellow Pages)
    • syslog — Unix syslog library routines
  • image-plusUndocumented Modules
    • Platform specific modules
  • image-plusIntroduction
    • Include Files
    • Objects, Types and Reference Counts
    • Exceptions
    • Embedding Python
    • Debugging Builds
  • The Very High Level Layer
  • Reference Counting
  • image-plusException Handling
    • Standard Exceptions
  • image-plusUtilities
    • Operating System Utilities
    • System Functions
    • Process Control
    • Importing Modules
    • Data marshalling support
    • Parsing arguments and building values
    • String conversion and formatting
    • Reflection
  • image-plusAbstract Objects Layer
    • Object Protocol
    • Number Protocol
    • Sequence Protocol
    • Mapping Protocol
    • Iterator Protocol
    • Buffer Protocol
  • image-plusConcrete Objects Layer
    • Fundamental Objects
    • Numeric Objects
    • Sequence Objects
    • Mapping Objects
    • Other Objects
  • image-plusInitialization, Finalization, and Threads
    • Thread State and the Global Interpreter Lock
    • Profiling and Tracing
    • Advanced Debugger Support
  • image-plusMemory Management
    • Overview
    • Memory Interface
    • Examples
  • image-plusObject Implementation Support
    • Allocating Objects on the Heap
    • Common Object Structures
    • Type Objects
    • Number Object Structures
    • Mapping Object Structures
    • Sequence Object Structures
    • Buffer Object Structures
    • Supporting Cyclic Garbage Collection
  • image-plusExtending 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
  • image-plusDefining New Types
    • The Basics
    • Type Methods
  • image-plusBuilding C and C++ Extensions with distutils
    • Distributing your extension modules
  • image-plusBuilding C and C++ Extensions on Windows
    • A Cookbook Approach
    • Differences Between Unix and Windows
    • Using DLLs in Practice
  • image-plusEmbedding Python in Another Application
    • Very High Level Embedding
    • Beyond Very High Level Embedding: An overview
    • Pure Embedding
    • Extending Embedded Python
    • Embedding Python in C++
    • Linking Requirements
  • __future__
  • __main__
  • _dummy_thread
  • _thread
  • abc
  • aifc
  • array
  • ast
  • asynchat
  • asyncore
  • atexit
  • audioop
  • base64
  • bdb
  • binascii
  • binhex
  • bisect
  • builtins
  • bz2
  • calendar
  • cgi
  • cgitb
  • chunk
  • cmath
  • cmd
  • code
  • codecs
  • codeop
  • collections
  • colorsys
  • compileall
  • configparser
  • contextlib
  • copy
  • copyreg
  • cProfile
  • crypt (Unix)
  • csv
  • ctypes
  • curses
  • curses.ascii
  • curses.panel
  • curses.textpad
  • curses.wrapper
  • datetime
  • dbm
  • dbm.dumb
  • dbm.gnu (Unix)
  • dbm.ndbm (Unix)
  • decimal
  • difflib
  • 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
  • doctest
  • dummy_threading
  • email
  • 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
  • fnmatch
  • formatter
  • fpectl (Unix)
  • fractions
  • ftplib
  • functools
  • gc
  • getopt
  • getpass
  • gettext
  • glob
  • grp (Unix)
  • gzip
  • hashlib
  • heapq
  • hmac
  • html.entities
  • html.parser
  • http.client
  • http.cookiejar
  • http.cookies
  • http.server
  • imaplib
  • imghdr
  • imp
  • inspect
  • io
  • itertools
  • json
  • keyword
  • lib2to3
  • linecache
  • locale
  • logging
  • logging.handlers
  • macpath
  • mailbox
  • mailcap
  • marshal
  • math
  • mimetypes
  • mmap
  • modulefinder
  • msilib (Windows)
  • msvcrt (Windows)
  • multiprocessing
  • multiprocessing.connection
  • multiprocessing.dummy
  • multiprocessing.managers
  • multiprocessing.pool
  • multiprocessing.sharedctypes
  • netrc
  • nis (Unix)
  • nntplib
  • numbers
  • operator
  • optparse
  • os
  • os.path
  • ossaudiodev (Linux, FreeBSD)
  • parser
  • pdb
  • pickle
  • pickletools
  • pipes (Unix)
  • pkgutil
  • platform
  • plistlib
  • poplib
  • posix (Unix)
  • pprint
  • pstats
  • pty (IRIX, Linux)
  • pwd (Unix)
  • py_compile
  • pyclbr
  • pydoc
  • queue
  • quopri
  • random
  • re
  • readline (Unix)
  • reprlib
  • resource (Unix)
  • rlcompleter
  • runpy
  • sched
  • select
  • shelve
  • shlex
  • shutil
  • signal
  • site
  • smtpd
  • smtplib
  • sndhdr
  • socket
  • socketserver
  • spwd (Unix)
  • sqlite3
  • ssl
  • stat
  • string
  • stringprep
  • struct
  • subprocess
  • sunau
  • symbol
  • symtable
  • sys
  • syslog (Unix)
  • tabnanny
  • tarfile
  • telnetlib
  • tempfile
  • termios (Unix)
  • test
  • test.support
  • textwrap
  • threading
  • time
  • timeit
  • tkinter
  • tkinter.scrolledtext (Tk)
  • tkinter.tix
  • token
  • tokenize
  • trace
  • traceback
  • tty (Unix)
  • turtle
  • types
  • unicodedata
  • unittest
  • urllib.error
  • urllib.parse
  • urllib.request
  • urllib.response
  • urllib.robotparser
  • uu
  • uuid
  • warnings
  • wave
  • weakref
  • webbrowser
  • winreg (Windows)
  • 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
  • xmlrpc.client
  • xmlrpc.server
  • zipfile
  • zipimport
  • zlib

Website

PEPs

Newsgroups

Advanced search

Package index

Browse the tree of packages

Issue tracker

  • A