seek python parser

Paul Boddie paul at
Sun Aug 7 15:32:33 CEST 2005

I tend to use the compiler module:

With the output of the parsing functions I selectively inspect the AST
nodes using the named attributes listed in the documentation:

For cases where one just needs to traverse the child nodes of an AST
node, the getChildNodes method is probably more helpful than the
getChildren method, which returns things like name strings and other
miscellaneous information mixed up with the list of nodes.

If you want a genuine XML DOM version of a Python AST, the following
project might provide you with a solution:

See also:


More information about the Python-list mailing list