Python AST -> source code

Ricardo Santos dpgkru at email.com
Fri Jul 16 03:06:27 EDT 2004


Hi,

I have a Python AST, which I have modified slightly (but still a valid
Python AST). How do I go back to its source code representation?

source code -> AST   (POSSIBLE)
AST -> source code   (????????)

Can someone point me to an open source solution? I don't want to have
to implement a "pretty printing" AST visitor myself.

Thanks

Ricardo Santos



More information about the Python-list mailing list