parser and tokenize modules: sample code?

Michael Hudson mwh21 at
Fri Apr 28 12:48:37 EDT 2000

Shae Erisson <shapr at> writes:

> Can someone point me to sample code for the parser and tokenize modules?
> As Moshe Zadka says, the parser module doesn't seem easy to use. I've
> read through the for the parser module, but I'd like to see
> more code if someone has some.

The file "" from p2c takes the output of parser and
produces something easier to work with (allegedly; I've never used
it).  Start with one of these links:


31. Simplicity does not precede complexity, but follows it. 
     -- Alan Perlis,

More information about the Python-list mailing list