The standard module tokenizer contains a Python parser with regular
expressions for Python strings. This should get youstarted, at least.
(You simply *must* use regular expressions for problems like this --
a loop looking at every character in Python code will be way too
slow...)
--Guido van Rossum, CWI, Amsterdam <mailto:Guido.van.Rossum@cwi.nl>
<http://www.cwi.nl/cwi/people/Guido.van.Rossum.html>