tools for literate programming with Python?

I’ve had an idea kicking around in my head for a couple of days. It’s one of those things I just can’t seem to let go of, but I don’t really have time to build it right now. I’m hoping someone out there had the same idea already and written something that works sort of like what I want. Failing that, maybe someone looking for a project to start will like this idea.

PyMOTW: fnmatch

The fnmatch module is used to compare filenames against glob-style patterns such as used by Unix shells. Read more at pymotw.com: fnmatch

Shell history, jigs, & subversion

Everyone else is showing theirs, so here’s mine: $ history|awk '{a[$2]++} END{for(i in a){printf 5dt%sna[i],i}}'|sort -rn|head 162 svn 99 ls 80 rtop 69 sudo 63 cd 55 dotest 51 workon 23 make 21 close_branch 21 cl2svn Software Jigs: Does it say anything in particular about me that half of those commands are aliases or scripts I or my co-workers have created to wrap up other tools? rtop – is a bash alias to change directory to the top of sandbox.

New release: virtualenvwrapper

Last week I finally cleaned up the wrapper code I’ve been using with Ian Bicking’s virtualenv. The results are a set of bash functions imaginatively dubbed “virtualenvwrapper”. The basic idea is that you source the script in your ~/.bashrc, and then you can use the functions it defines to manage your virtual environments, either from other scripts or from the command line. mkvirtualenv is a thin wrapper around virtualenv itself, and creates environments in a special directory, which you can control through the WORKON_HOME variable.

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.

PyMOTW: operator

Functional programming using iterators occasionally requires you to create small functions for simple expressions. Sometimes these can be expressed as lambda functions. But for some operations, you don’t need to define your own function at all. The operator module defines functions that correspond to built-in operations for arithmetic, and comparison as well as sequence and dictionary operations. Read more at pymotw.com: operator

Site outage, should be OK now

I spent a good portion of yesterday swapping the main drive out of my home server because it was giving me signs that it was starting to fail (random system halts, CRC errors, and undecipherable messages about DMA support). After much wailing and gnashing of teeth, it seems to be back online. The serendipity of finding this Coding Horror post in my news reader this morning was surprising. I’d long ago given up on upgrades for similar reasons.

PyCon 2008 | And Now For Something Completely Different, April 2008

Originally published in Python Magazine Volume 2 Issue 4 , April, 2008 PyCon 2008 was held March 12-20 in Chicago. The explosive growth in attendance of the conference translated to an increase in energy and enthusiasm, from both attendees and organizers. I haven’t made it to a Python convention for several years, not since before they changed from being called International Python Conference to the community organized PyCon, so I was excited to have a chance to go to PyCon 2008 in Chicago last month.

PyMOTW: urllib

The urllib module provides a simple interface for network resource access. Read more at pymotw.com: urllib

PyMOTW: collections

The collections module includes container data types beyond the builtin types list and dict. Read more at pymotw.com: collections