One year of “The Python Module of the Week”

It’s a bit passé to recognize blogging anniversaries, but as it’s my first I’m going to do a little retrospecting anyway. :-)

I just realized this afternoon that I had missed celebrating the first anniversary of PyMOTW by a few weeks. I started the series as an excuse to force myself to write something once a week. At the time, it seemed like a somewhat lame idea and I wasn’t sure I would keep it up. There are any number of reference guides for the standard library out there. Sitting down to read through one isn’t that exciting, though, so I thought writing example code with all of the modules would be a way to force myself to actually study the modules I didn’t use on a regular basis.

The first real post from 25 March 2007 covered the fileinput module. It wasn’t until several posts into the series that I started collecting and releasing the code through PyPI, so the version number for the source package is only up to 1.48 even though I’ve done more than 52 weeks worth of modules. (The os module took 4 weeks, so I haven’t done as many modules as weeks of posts.)

My Writing Process

My process for creating the posts has changed substantially over the last year. The first few posts were posted through the web form on blogger.com. They consisted of a lot of hand-edited HTML combined with output from the web version of pygments (used to highlight the syntax in the code examples). I also used to write the prose for each post first, and the code samples later.

Now, I have the entire process reversed. I work through all of the code examples before writing any prose. The code comes more quickly, and I can revise and refactor it so the examples work together without having to go back and edit the rest of the text. Once I have the code finished, I use a combination of shortcuts I’ve built for TextMate and MarsEdit to assemble the post and write the prose portions. It takes me a lot less time to create a single post now that I’ve refined the workflow. The post on the operator module from today, for example, only took a couple of hours (with interruptions). It is a little skimpy on prose, though.

Future Plans

Since the beginning, I’ve had a fair number of comments (online and off) from people who tell me that the posts have been personally useful to them. I appreciate that sort of feedback, and it motivates me to keep going. I’m running out of the “simple” modules, and as I’ve also started working on Python Magazine over the past year, I don’t actually have the same amount of free time any more. Having a bit of extra motivation will spur me to pick up some of the bigger modules like email and elementtree.

At the rate I’m going, I’m not going to finish the whole library before Python 3.0 comes out, and the current plans call for some modules to be removed, deprecated APIs to be dropped, and other sorts of changes. The rules say some modules can even be renamed. When that settles down and there is an actual release, I’ll probably stop writing about 2.x and pick up with 3.0. I haven’t decided yet, though.

Python Module of the Week Home