replacement of rexec?
Huaiyu Zhu
huaiyu at gauss.almaden.ibm.com
Wed Oct 29 19:56:50 EST 2003
In article <8cf2994e.0310231033.6a01871a at posting.google.com>, Paul Clinch wrote:
> You could use the new compiler module to parse and inspect the result like this:
>
> import compiler as cplr
> mod = cplr.parseFile("filetoload")
> for node in mod.node.nodes:
> if 'Function' in str(node):
> break
Thanks for the suggestion. Is there existing code to assemble the parsed
tree back to the intended Python object? It's probably not too hard to
write one, but I wonder if this is already done?
Huaiyu
More information about the Python-list
mailing list