Personal tools
Skip to content. | Skip to navigation
The lockfile module exports a FileLock class which provides a simple API for locking files. Unlike the Windows msvcrt.locking function, the Unix fcntl.flock, fcntl.lockf and the deprecated posixfile module, the API is identical across both Unix (including Linux and Mac) and Windows platforms. The lock mechanism relies on the atomic nature of the link (on Unix) and mkdir (on Windows) system calls.
Mako is a template library written in Python. It provides a familiar, non-XML syntax which compiles into Python modules for maximum performance. Mako's syntax and API borrows from the best ideas of many others, including Django templates, Cheetah, Myghty, and Genshi. Conceptually, Mako is an embedded Python (i.e. Python Server Page) language, which refines the familiar ideas of componentized layout and inheritance to produce one of the most straightforward and flexible models available, while also maintaining close ties to Python calling and scoping semantics.
This is a Python implementation of John Gruber’s Markdown. It is almost completely compliant with the reference implementation, though there are a few very minor differences.
A library for safe markup escaping. Python 2 version.
A library that allows the embedding of configuration information in Python code. Martian can then grok the system and do the appropriate configuration registrations. One example of a system that uses Martian is the system where it originated: Grok
Ned's script to check McCabe complexity. This module provides a plugin for ``flake8``, the Python code checker.
Stateful programmatic web browsing, after Andy Lester's Perl module WWW::Mechanize. The library is layered: mechanize.Browser (stateful web browser), mechanize.UserAgent (configurable URL opener), plus urllib2 handlers. Features include: ftp:, http: and file: URL schemes, browser history, high-level hyperlink and HTML form support, HTTP cookies, HTTP-EQUIV and Refresh, Referer [sic] header, robots.txt, redirections, proxies, and Basic and Digest HTTP authentication. mechanize's response objects are (lazily-) .seek()able and still work after .close(). Much of the code originally derived from Perl code by Gisle Aas (libwww-perl), Johnny Lee (MSIE Cookie support) and last but not least Andy Lester (WWW::Mechanize). urllib2 was written by Jeremy Hylton.
Let Mr. Developer help you win the everlasting buildout battle! (Remixed by Matt Hamilton, original from is a zc.buildout_ extension that makes it easy to work with buildouts containing lots of packages, of which you only want to develop some. The basic idea comes from Wichert Akkerman's plonenext_ effort.
MessagePack is a binary-based efficient data interchange format that is focused on high performance. It is like JSON, but very fast and small. This is a Python (de)serializer for MessagePack.
Implementation of a multi-key dictionary, i.e.: (key1[,key2, ..]) => value This dictionary has a similar interface to the standard dictionary => but is extended to support multiple keys referring to the same element.