About Python Module of the Week
PyMOTW is a series of blog posts written by Doug Hellmann. It was started as a way to build the habit of writing something on a regular basis. The focus of the series is building a set of example code for the modules in the Python standard library.
Complete documentation for the standard library can be found on the Python web site at http://docs.python.org/library/contents.html.
Tools
The source text for PyMOTW is reStructuredText and the HTML and PDF output are created using Sphinx.
Subscribe
As new articles are written, they are posted to my blog. Updates are available by RSS and email. See the project home page for details (http://www.doughellmann.com/PyMOTW/).
Translations and Other Versions
Junjie Cai and Yan Sheng have started a google code project called PyMOTWCN (http://code.google.com/p/pymotwcn/) and posted the completed translations at http://www.vbarter.cn/pymotw/.
Ralf Schönian is translating PyMOTW into German, following an alphabetical order. The results are available on his web site, http://schoenian-online.de/pymotw.html. Ralf is an active member of the pyCologne user group in Germany and author of pyVoc, the open source English/German vocabulary trainer (http://code.google.com/p/pyvoc/).
Roberto Pauletto is working on an Italian translation at http://robyp.x10hosting.com/. Roberto creates Windows applications with C# by day, and tinkers with Linux and Python at home. He has recently moved to Python from Perl for all of his system-administration scripting.
Ernesto Rico Schmidt provides a Spanish translation that follows the English version posts. Ernesto is in Bolivia, and is translating these examples as a way to contribute to the members of the Bolivian Free Software community who use Python. The full list of articles available in Spanish can be found at http://denklab.org/articles/category/pymotw/, and there is an RSS feed.
Tetsuya Morimoto is creating a Japanese translation. Tetsuya has used Python for 1.5 years. He has as experience at a Linux Distributor using Python with yum, anaconda, and rpm-tools while building RPM packages. Now, he uses it to make useful tools for himself, and is interested in application frameworks such as Django, mercurial and wxPython. Tetsuya is a member of Python Japan User’s Group and Python Code Reading. The home page for his translation is http://d.hatena.ne.jp/t2y-1979/20090525/1243227350.
Gerard Flanagan is working on a “Python compendium” called The Hazel Tree. He is converting a collection of old and new of Python-related reference material into reStructuredText and then building a single searchable repository from the results. I am very pleased to have PyMOTW included with works from authors like Mark Pilgrim, Fredrik Lundh, Andrew Kuchling, and a growing list of others.
Other Contributors
Thank you to John Benediktsson for the original HTML-to-reST conversion.
Copyright
All of the prose from the Python Module of the Week is licensed under a Creative Commons Attribution, Non-commercial, Share-alike 3.0 license. You are free to share and create derivative works from it. If you post the material online, you must give attribution and link to the PyMOTW home page (http://www.doughellmann.com/PyMOTW/). You may not use this work for commercial purposes. If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.
The source code included here is copyright Doug Hellmann and licensed under the BSD license.
Copyright Doug Hellmann, All Rights Reserved
Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Doug Hellmann not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission.
DOUG HELLMANN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL DOUG HELLMANN BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- Features of the Standard Library
- Built-in Objects
- String Services
- Data Types
- array – Sequence of fixed-type data
- datetime – Date/time value manipulation
- calendar – Work with dates
- collections – Container data types
- heapq – In-place heap sort algorithm
- bisect – Maintain lists in sorted order
- sched – Generic event scheduler.
- Queue – A thread-safe FIFO implementation
- weakref – Garbage-collectable references to objects
- copy – Duplicate objects
- pprint – Pretty-print data structures
- Numeric and Mathematical Modules
- Internet Data Handling
- File Formats
- Cryptographic Services
- File and Directory Access
- os.path – Platform-independent manipulation of file names.
- fileinput – Process lines from input streams
- filecmp – Compare files
- tempfile – Create temporary filesystem resources.
- glob – Filename pattern matching
- fnmatch – Compare filenames against Unix-style glob patterns.
- linecache – Read text files efficiently
- shutil – High-level file operations.
- dircache – Cache directory listings
- Data Compression and Archiving
- Data Persistence
- anydbm – Access to DBM-style databases
- dbhash – DBM-style API for the BSD database library
- dbm – Simple database interface
- dumbdbm – Portable DBM Implementation
- gdbm – GNU’s version of the dbm library
- pickle and cPickle – Python object serialization
- shelve – Persistent storage of arbitrary Python objects
- whichdb – Identify DBM-style database formats
- sqlite3 – Embedded Relational Database
- Generic Operating System Services
- os – Portable access to operating system specific features.
- time – Functions for manipulating clock time
- getopt – Command line option parsing
- optparse – Command line option parser to replace getopt.
- argparse – Command line option and argument parsing.
- logging – Report status, error, and informational messages.
- getpass – Prompt the user for a password without echoing.
- platform – Access system version information
- Optional Operating System Services
- Unix-specific Services
- Interprocess Communication and Networking
- Internet Protocols and Support
- BaseHTTPServer – base classes for implementing web servers
- cgitb – Detailed traceback reports
- Cookie – HTTP Cookies
- imaplib - IMAP4 client library
- SimpleXMLRPCServer – Implements an XML-RPC server.
- smtpd – Sample SMTP Servers
- smtplib – Simple Mail Transfer Protocol client
- socket – Network Communication
- select – Wait for I/O Efficiently
- SocketServer – Creating network servers.
- urllib – simple interface for network resource access
- urllib2 – Library for opening URLs.
- urlparse – Split URL into component pieces.
- uuid – Universally unique identifiers
- webbrowser – Displays web pages
- xmlrpclib – Client-side library for XML-RPC communication
- Structured Markup Processing Tools
- Internationalization
- Program Frameworks
- Development Tools
- Debugging and Profiling
- Python Runtime Services
- abc – Abstract Base Classes
- atexit – Call functions when a program is closing down
- contextlib – Context manager utilities
- gc – Garbage Collector
- inspect – Inspect live objects
- site – Site-wide configuration
- sys – System-specific Configuration
- sysconfig – Interpreter Compile-time Configuration
- traceback – Extract, format, and print exceptions and stack traces.
- warnings – Non-fatal alerts
- Importing Modules
- Miscelaneous
- History