On Oct 13, 12:45 pm, Steven D'Aprano <ste... at REMOVE.THIS.cybersource.com.au> wrote: > > Have you looked at the tokenize module? > > http://docs.python.org/library/tokenize.html Thanks Steven -- that was what I was looking for.