__builtin__ Provide direct access to all `built-in' identifiers of Python, e.g. __builtin__.open is the full name for the built-in function open() .

__future__ Future statement definitions. Used to progressively introduce new features in the language.

__main__ Represent the (otherwise anonymous) scope in which the interpreter's main program executes -- commands read either from standard input, from a script file, or from an interactive prompt. Typical idiom to check if a code was run as a script (as opposed to being imported):

if __name__ == '__main__':

main() # (this code was run as script)

abc (new in 2.6) Abstract Base Classes (ABC) [PEP 3119]. Equivalent of Java interfaces. The module collections defines interfaces/ABCs for many behaviors/protocols/data structures ( Iterable , Hashable , Sequence , Set , etc...).

aifc Stuff to parse AIFF-C and AIFF files.

anydbm Generic interface to all dbm clones. (dbhash, gdbm, dbm, dumbdbm).

array Efficient arrays of numeric values.

ast (new in 2.6) Helpers to process Trees of the Python Abstract Syntax grammar.

asynchat A class supporting chat-style (command/response) protocols.

asyncore Basic infrastructure for asynchronous socket service clients and servers.

atexit Register functions to be called at exit of Python interpreter.

audiodev Classes for manipulating audio devices (currently only for Sun and SGI). Deprecated since 2.6.

audioop Manipulate raw audio data. 2.5: Supports the a-LAW encoding.

base64 Conversions to/from base64 transport encoding as per RFC-1521.

BaseHTTPServer HTTP server base class

Bastion "Bastionification" utility (control access to instance vars).

bdb A generic Python debugger base class.

binascii Convert between binary and ASCII.

binhex Macintosh binhex compression/decompression.

bisect Bisection algorithms.

bsddb (Optional) improved BSD database interface [package].

bz2 BZ2 compression.

calendar Calendar printing functions.

cgi Wraps the WWW Forms Common Gateway Interface (CGI).

CGIHTTPServer CGI-savvy HTTP Server.

cgitb Traceback manager for CGI scripts.

chunk Read IFF chunked data.

cmath Mathematical functions for complex numbers. See also math.

cmd A generic class to build line-oriented command interpreters.

cmp Efficiently compare files, boolean outcome only.

cmpcache Same, but caches 'stat' results for speed.

code Utilities needed to emulate Python's interactive interpreter.

codecs Lookup existing Unicode encodings and register new ones. 2.5: support for incremental codecs.

codeop Utilities to compile possibly incomplete Python source code.

collections high-performance container datatypes. 2.4: The only datatype defined is a double-ended queue deque . 2.5: Type deque has now a remove method. New type defaultdict . 2.6: New type namedtuple . Define many ABCs (Abstract Base Classes) like Container, Hashable, Iterable, Sequence, Set...

colorsys Conversion functions between RGB and other color systems.

commands Execute shell commands via os.popen [Unix] .

compileall Force "compilation" of all .py files in a directory.

ConfigParser Configuration file parser (much like windows .ini files).

contextlib Utilities for with statement contexts.

Cookie HTTP state (cookies) management.

copy Generic shallow and deep copying operations.

copy_reg Helper to provide extensibility for modules pickle/cPickle.

cPickle Faster, C implementation of pickle.

cProfile Faster, C implementation of profile.

crypt Function to check Unix passwords [Unix] .

cStringIO Faster, C implementation of StringIO.

csv Tools to read comma-separated files (of variations thereof). 2.5: Several enhancements.

ctypes "Foreign function" library for Python. Provides C compatible data types, and allows to call functions in dlls/shared libraries. Can be used to wrap these libraries in pure Python.

curses Terminal handling for character-cell displays [Unix/OS2/DOS only] .

datetime Improved date/time types ( date , time , datetime , timedelta ). 2.5: New method strptime(string, format) for class datetime . 2.6: strftime() new format code %f expanding to number of s.

dbhash (g)dbm-compatible interface to bsdhash.hashopen.

decimal Decimal floating point arithmetic.

difflib Tool for comparing sequences, and computing the changes required to convert one into another. 2.5: Improved SequenceMatcher.get_matching_blocks() method .

dircache Sorted list of files in a dir, using a cache. Deprecated since 2.6.

dircmp Defines a class to build directory diff tools on.

dis Bytecode disassembler.

distutils Package installation system. setup enhanced with new keyword parameters requires , provides , obsoletes , and download_url [PEP314] 2.5: Functionenhanced with new keyword parameters, and

distutils.command.register Registers a module in the Python package index (PyPI). This command plugin adds the register command to distutil scripts.

distutils.debug

distutils.emxccompiler

distutils.log

dl Call C functions in shared objects [Unix] . Deprecated since 2.6.

doctest Unit testing framework based on running examples embedded in docstrings. 2.5: New SKIP option. New encoding arg to testfile() function.

DocXMLRPCServer Creation of self-documenting XML-RPC servers, using pydoc to create HTML API doc on the fly. 2.5: New attribute rpc_paths .

dospath Common operations on DOS pathnames.

dumbdbm A dumb and slow but simple dbm clone.

dump Print python code that reconstructs a variable.

dummy_thread

dummy_threading Helpers to make it easier to write code that uses threads where supported, but still runs on Python versions without thread support. The dummy modules simply run the threads sequentially.

email A package for parsing, handling, and generating email messages. New version 3.0 dropped various deprecated APIs and removes support for Python versions earlier than 2.3. 2.5: Updated to version 4.0.

encodings New codecs: idna (IDNA strings), koi8_u (Ukranian), palmos (PalmOS 3.5), punycode (Punycode IDNA codec), string_escape (Python string escape codec: replaces non-printable chars w/ Python-style string escapes). New codecs in 2.4: HP Roman8, ISO_8859-11, ISO_8859-16, PCTP-154, TIS-620; Chinese, Japanese and Korean codecs.

errno Standard errno system symbols. The value of each symbol is the corresponding integer value.

exceptions Class based built-in exception hierarchy.

fcntl The fcntl() and ioctl() system calls [Unix] .

filecmp File and directory comparison.

fileinput Helper class to quickly write a loop over all standard input files. 2.5: Made more flexible (Unicode filenames, mode parameter, etc...)

find Find files directory hierarchy matching a pattern.

fnmatch Filename matching with shell patterns.

formatter Generic output formatting.

fpectl Floating point exception control [Unix] .

fpformat General floating point formatting functions. Deprecated since 2.6.

fractions (new in 2.6) Rational Numbers.

ftplib An FTP client class. Based on RFC 959.

functools Tools for functional-style programming. See in particular function partial() [PEP309].

future_builtins (new in 2.6) Python 3 builtins. Provides functions that exist in 2.x, but have different behavior in Python 3 (ascii, map, filter, hex...). To write Python 3 compatible code, import the fcts from this module, e.g.: from future_builtins import map

...code using Python3-syle map()...

gc Perform garbage collection, obtain GC debug stats, and tune GC parameters. 2.5: New get_count() function. gc.collect() takes a new generation argument.

gdbm GNU's reinterpretation of dbm [Unix] .

getopt Standard command line processing. See also optparse.

getpass Utilities to get a password and/or the current user name.

gettext Internationalization and localization support.

glob Filename "globbing" utility.

gopherlib Gopher protocol client interface.

grp The group database [Unix] .

grep 'grep' utilities.

gzip Read & write gzipped files.

hashlib Secure hashes and message digests.

heapq Heap queue (priority queue) helpers. 2.5: nsmallest() and nlargest() takes a key keyword param.

hmac HMAC (Keyed-Hashing for Message Authentication).

hotshot.stones Helper to run the pystone benchmark under the Hotshot profiler.

htmlentitydefs HTML character entity references.

htmllib HTML2 parsing utilities

HTMLParser Simple HTML and XHTML parser.

httplib HTTP1 client class.

idlelib (package) Support library for the IDLE development environment.

ihooks Hooks into the "import" mechanism. Deprecated since 2.6.

imageop Manipulate raw image data. Deprecated since 2.6.

imaplib IMAP4 client.Based on RFC 2060.

imghdr Recognizing image files based on their first few bytes.

imp Access the import internals.

imputil Provides a way of writing customized import hooks.

inspect Get information about live Python objects.

io (new in 2.6) Core tools for working with streams [PEP 3116]. Define Abstract Base Classes RawIOBase (I/O operations: read, write, seek..), BufferedIOBase (buffering), and TextIOBase (reading & writing strings).

itertools Tools to work with iterators and lazy sequences. 2.5: islice() accepts None for start & step args. 2.6: Several new functions: izip_longest , product , combinations , permutations .

json (new in 2.6) JSON (JavaScript Object Notation) interchange format support.

keyword List of Python keywords.

knee A Python re-implementation of hierarchical module import.

linecache Cache lines from files.

linuxaudiodev Linux /dev/audio support. Replaced by ossaudiodev (Linux).

locale Support for number formatting using the current locale settings. 2.5: format() modified; new fcts format_string() and currency()

logging (package) Tools for structured logging in log4j style.

macpath Pathname (or related) operations for the Macintosh [Mac] .

macurl2path Mac specific module for conversion between pathnames and URLs [Mac] .

mailbox Classes to handle Unix style, MMDF style, and MH style mailboxes. 2.5: added capability to modify mailboxes in addition to reading them.

mailcap Mailcap file handling (RFC 1524).

marshal Internal Python object serialization.

markupbase Shared support for scanning document type declarations in HTML and XHTML.

math Mathematical functions. See also cmath

md5 MD5 message digest algorithm. 2.5: Now a mere wrapper around new library hashlib . Deprecated since 2.6, use hashlib module instead.

mhlib MH (mailbox) interface. Deprecated since 2.6.

mimetools Various tools used by MIME-reading or MIME-writing programs. Deprecated since 2.6.

mimetypes Guess the MIME type of a file.

MimeWriter Generic MIME writer. Deprecated since 2.3, use email package instead.

mimify Mimification and unmimification of mail messages. Deprecated since 2.6, use email package instead.

mmap Interface to memory-mapped files - they behave like mutable strings.

modulefinder Tools to find what modules a given Python program uses, without actually running the program.

msilib Read and write Microsoft Installer files [Windows] .

msvcrt File & Console Windows-specific operations [Windows] .

multifile A readline()-style interface to the parts of a multipart message. Deprecated since 2.6.

multiprocessing (new in 2.6) Process-based "threading" interface. Allows to fully leverage multiple processors on a machine [Windows, Unix] [PEP 371].

mutex Mutual exclusion -- for use with module sched. See also std module threading , and glock.

netrc Parses and encapsulates the netrc file format.

new Creation of runtime internal objects (interface to interpreter object creation functions). Deprecated since 2.6.

nis Interface to Sun's NIS (Yellow Pages) [Unix] . 2.5: New domain arg to nis.match() and nis.maps() .

nntplib An NNTP client class. Based on RFC 977.

ntpath Common operations on Windows pathnames [Windows] .

nturl2path Convert a NT pathname to a file URL and vice versa [Windows] .

numbers (new in 2.6) Numeric Abstract Base Classes (ABC) [PEP 3141]. Define a type hierarchy for numbers: Number , Complex , Real , Rational , Integral .

olddifflib Old version of difflib (helpers for computing deltas between objects)?

operator Standard operators as functions. 2.5: itemgetter() and attrgetter() now supports multiple fields.

optparse Improved command-line option parsing library (see also getopt). 2.5: Updated to Optik library 1.51.

os OS routines for Mac, DOS, NT, or Posix depending on what system we're on. 2.5: os.stat() return time values as floats; new constants to os.lseek() ; new functions wait3() and wait4() ; on FreeBSD, os.stat() returns times with nanosecond resolution.

os.path Common pathname manipulations.

os2emxpath os.path support for OS/2 EMX.

packmail Create a self-unpacking shell archive.

parser Access Python parse trees.

pdb A Python debugger.

pickle Pickling (save/serialize and restore/deserialize) of Python objects (a faster C implementation exists in built-in module: cPickle ). 2.5: Value returned by __reduce__() must be different from None .

pickletools Tools to analyze and disassemble pickles.

pipes Conversion pipeline templates [Unix] .

pkgutil Tools to extend the module search path for a given package. 2.5: PEP302's import hooks support; works for packages in ZIP format archives.

platform Get info about the underlying platform.

poly Polynomials.

popen2 Spawn a command with pipes to its stdin, stdout, and optionally stderr. Superseded by module subprocess since 2.4. Deprecated since 2.6.

poplib A POP3 client class.

posix Most common POSIX system calls [Unix] .

posixfile (deprecated since 1.5, use fcntl.lockf() instead) File-like objects with locking support [Unix] .

posixpath Common operations on POSIX pathnames.

pprint Support to pretty-print lists, tuples, & dictionaries recursively.

pre Support for regular expressions (RE) - see re .

profile Class for profiling python code. 2.5: See also new fast C implementation cProfile

pstats Class for printing reports on profiled python code. 2.5: new stream arg to Stats constructor.

pty Pseudo terminal utilities [Linux, IRIX] .

pwd The password database [Unix] .

py_compile Routine to "compile" a .py file to a .pyc file.

pyclbr Parse a Python file and retrieve classes and methods.

pydoc Generate Python documentation in HTML or text for interactive use.

pyexpat Interface to the Expat XML parser. 2.5: now uses V2.0 of the expat parser.

PyUnit Unit test framework inspired by JUnit. See unittest .

Queue A multi-producer, multi-consumer queue. 2.6: New queue variants PriorityQueue and LifoQueue .

quopri Conversions to/from quoted-printable transport encoding as per RFC 1521.

rand Don't use unless you want compatibility with C's rand().

random Random variable generators.

re Regular Expressions.

readline GNU readline interface [Unix] .

reconvert Convert old ("regex") regular expressions to new syntax ("re").

regexp Backward compatibility for module "regexp" using "regex".

regex_syntax Flags for regex.set_syntax() .

regsub Regexp-based split and replace using the obsolete regex module.

repr Alternate repr() implementation.

resource Resource usage information [Unix] .

rexec Restricted execution facilities ("safe" exec, eval, etc).

rfc822 Parse RFC-8222 mail headers.

rgbimg Read and write 'SGI RGB' files.

rlcompleter Word completion for GNU readline 2.0 [Unix] . 2.5: Doesn't depend on readline anymore; now works on non-Unix platforms.

robotparser Parse robot.txt files, useful for web spiders.

sched A generally useful event scheduler class.

select Waiting for I/O completion.

sets A Set datatype implementation based on dictionaries. Deprecated since 2.6, use built-in types set and frozenset instead.

sgmllib A parser for SGML, using the derived class as a static DTD.

sha SHA-1 message digest algorithm. 2.5: Now a mere wrapper around new library hashlib . Deprecated since 2.6, use hashlib instead.

shelve Manage shelves of pickled objects.

shlex Lexical analyzer class for simple shell-like syntaxes.

shutil Utility functions for copying files and directory trees.

signal Set handlers for asynchronous events.

SimpleHTTPServer Simple HTTP Server.

SimpleXMLRPCServer Simple XML-RPC Server. 2.5: New attribute rpc_paths .

site Append module search paths for third-party packages to sys.path .

smtpd An RFC 2821 SMTP server.

smtplib SMTP/ESMTP client class.

sndhdr Several routines that help recognizing sound.

socket Socket operations and some related functions. Now supports timeouts thru function settimeout(t) . Also supports SSL on Windows. 2.5: Now supports AF_NETLINK sockets on Linux; new socket methods recv_buf(buffer) , recvfrom_buf(buffer) , getfamily() , gettype() and getproto() .

SocketServer Generic socket server classes.

spwd Access to the UNIX shadow password database [Unix].

sqlite3 DB-API 2.0 interface for SQLite databases.

sre Support for regular expressions (RE). See re.

stat Constants/functions for interpreting results of os.

statcache Maintain a cache of stat() information on files.

statvfs Constants for interpreting statvfs struct as returned by os.statvfs() and os.fstatvfs() (if they exist). Deprecated since 2.6.

string A collection of string operations (see Strings).

StringIO File-like objects that read/write a string buffer (a faster C implementation exists in built-in module cStringIO).

stringprep Normalization and manipulation of Unicode strings.

struct Perform conversions between Python values and C structs represented as Python strings. 2.5: faster (new pack() and unpack() methods); pack and unpack to and from buffer objects via methods pack_into and unpack_from .

subprocess Subprocess management. Replacement for os.system, os.spawn*, os.popen*, popen2.* [PEP324]

sunau Stuff to parse Sun and NeXT audio files.

sunaudio Interpret sun audio headers.

symbol Non-terminal symbols of Python grammar (from "graminit.h").

symtable Interface to the compiler's internal symbol tables.

sys System-specific parameters and functions.

syslog Unix syslog library routines [Unix] .

tabnanny Check Python source for ambiguous indentation.

tarfile Tools to read and create TAR archives. 2.5: New method TarFile.extractall() .

telnetlib TELNET client class. Based on RFC 854.

tempfile Temporary files and filenames. 2.6: New classes SpooledTemporaryFile and NamedTemporaryFile .

termios POSIX style tty control [Unix] .

test Regression tests package for Python.

textwrap Tools to wrap paragraphs of text.

thread Multiple threads of control (see also threading below).

threading New threading module, emulating a subset of Java's threading model. 2.5: New function stack_size([size]) allows to get/set the stack size for threads created. 2.6: Several functions renamed or replaced by properties, new property Thread.ident . See also new module multiprocessing .

threading_api (doc of the threading module).

time Time access and conversions.

timeit Benchmark tool.

Tix Extension widgets for Tk.

Tkinter Python interface to Tcl/Tk.

toaiff Convert "arbitrary" sound files to AIFF (Apple and SGI's audio format). Deprecated since 2.6.

token Token constants (from "token.h").

tokenize Tokenizer for Python source.

trace Tools to trace execution of a function or program.

traceback Extract, format and print information about Python stack traces.

tty Terminal utilities [Unix] .

turtle LogoMation-like turtle graphics.

types Define names for all type symbols in the std interpreter.

tzparse Parse a timezone specification.

unicodedata Interface to unicode properties. 2.5: Updated to Unicode DB 4.1.0; Version 3.2.0 still available as unicodedata.ucd_3_2_0 . 2.6: Updated to Unicode DB 5.1.0.

unittest Python unit testing framework, based on Erich Gamma's and Kent Beck's JUnit.

urllib Open an arbitrary URL.

urllib2 An extensible library for opening URLs using a variety of protocols.

urlparse Parse (absolute and relative) URLs.

user Hook to allow user-specified customization code to run.

UserDict A wrapper to allow subclassing of built-in dict class dict is subclassable) (useless with new-style classes . Since Python 2.2,is subclassable)

UserList A wrapper to allow subclassing of built-in list class list is subclassable) (useless with new-style classes . Since Python 2.2,is subclassable)

UserString A wrapper to allow subclassing of built-in string class str is subclassable) (useless with new-style classes . Since Python 2.2,is subclassable)

util some useful functions that don't fit elsewhere !!

uu Implementation of the UUencode and UUdecode functions.

uuid UUID objects according to RFC 4122.

warnings Python part of the warnings subsystem. Issue warnings, and filter unwanted warnings.

wave Stuff to parse WAVE files.

weakref Weak reference support for Python. Also allows the creation of proxy objects. 2.5: new methods iterkeyrefs() , keyrefs() , itervaluerefs() and valuerefs() .

webbrowser Platform independent URL launcher. 2.5: several enhancements (more browsers supported, etc...).

whatsound Several routines that help recognizing sound files.

whichdb Guess which db package to use to open a db file.

whrandom Wichmann-Hill random number generator (obsolete, use random instead).

winsound Sound-playing interface for Windows [Windows] .

wsgiref WSGI Utilities and Reference Implementation.

xdrlib Implements (a subset of) Sun XDR (eXternal Data Representation).

xml.dom Classes for processing XML using the DOM (Document Object Model). 2.3: New modules expatbuilder, minicompat, NodeFilter, xmlbuilder.

xml.etree.ElementTree Subset of Fredrik Lundh's ElementTree library for processing XML.

xml.parsers.expat An interface to the Expat non-validating XML parser.

xml.sax Classes for processing XML using the SAX API.

xmlrpclib An XML-RPC client interface for Python. 2.5: Supports returning datetime objects for the XML-RPC date type.

xreadlines Provides a sequence-like object for reading a file line-by-line without reading the entire file into memory. Deprecated since release 2.3. Use for line in file instead. Removed since 2.4

zipfile Read & write PK zipped files. 2.5: Supports ZIP64 version, a .zip archive can now be larger than 4GB. 2.6: Class ZipFile has new methods extract() and extractall() .

zipimport ZIP archive importer.

zlib Compression compatible with gzip. 2.5: Compress and Decompress objects now support a copy() method.