>> Use the "shlex" module in the std lib? > > Well color me ignorant. > > Works cleanly. I shouldn't have reinvented the wheel.
I've experienced this enough: the csv module, option parsing, config-file parsing, logging, timeit, and pwd all come to mind as code I've written before realizing the stdlib already has it. Now, if my task sounds remotely like something that somebody else might have implemented already, my first stop is always to browse through the stdlib docs. Then try http://pypi.python.org/pypi to see if somebody else has already solved the problem without the solution getting into the stdlib. Only then do I proceed to trying to code up something of my own. -tkc -- http://mail.python.org/mailman/listinfo/python-list