Python Goodies

Here are my meager contributions to the world of Python software. Note that some of these are now distributed with Python.

mimelib
Yet another MIME handling library for Python. What I like about this one is that it provides an abstract MIME object model separate from parsing and generating the plain text representations. There is a separate parser to convert from plain text to the model, and a separate generate to output plain text from the model. Along the way, the object model can be manipulated in very Pythonic ways (or you can generate an entire model from scratch using the provided classes).

mimelib development has been moved to SourceForge. You can download the latest version of mimelib, or read the on-line documentation. mimelib is installable via the standard Python distutils facility; it has been tested with Python 2.0 and 2.1, and I have no plans to support earlier versions of Python.

smtpd.py
An experimental RFC 821 server, which implements the minimal required SMTP protocol. It's not very sophisticated, and there are some known problems with it, but I find it handy to experiment with and debug GNU Mailman. See comments in the code for more details.

BTW, the Mailman project will use a derivation of smtpd.py to implement the RFC 2033 LMTP protocol for local mail transport between the mail server and Mailman's incoming queue. This will be much more efficient than the current mail program delivery.

ht2html -- Python site generator
ht2html is the program that allows me to generate Web pages of the style seen on my personal pages. The same set of scripts are used to generate the Python.org site, the GNU Mailman site, and the Jython site. The framework lets you create one style class that customizes the colors, corner image, banner text, etc.

Fvwm Module
I have a Python module that interfaces with the Fvwm window manager for X. This was inspired by Jonathan Kelley's module for Fvwm version 1. Mine has been restructured and updated for Fvwm version 2. I've recently made a much improved version available; it's now been integrated with Tkinter so you can write modules that create windows.

Rot13
Here's a very simple script to do Rot13 (a.k.a. Caesar rotated) encoding and decoding.

Downloader
A handy little script that will help you keep your Solaris systems current, by automating the download of patches. Note that you must currently have a SunSolve account to use this. AFAIK, this does not work for Solaris 7 patches. I won't be updating it since I no longer use Solaris.