Python AST -> source code

Lonnie Princehouse finite.automaton at
Fri Jul 16 19:02:19 CEST 2004

If you _do_ wind up writing a pretty printing AST visitor, post it
somewhere!  I've searched around for something like this before with
no luck.

dpgkru at (Ricardo Santos) wrote in message news:<84824e2.0407152306.1b8c560b at>...
> 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