I tend to use the compiler module:
http://docs.python.org/lib/compiler.html
With the output of the parsing functions I selectively inspect the AST
nodes using the named attributes listed in the documentation:
http://docs.python.org/lib/module-compiler.ast.html
For cases where one just needs to
Hi,
Does anyone know of a python source parser program which can return the
parsed source file as a coherent dom-like data structure?
I'm playing around with ast, and the output of ast.tolist(), but it's
got a lot of chaff, and would need a lot of hacking to break it down to
simple data structure