Ka-Ping, FWIW, I've also got an implementation, which is based on the parser module rather than the compiler module. Much simpler, imo, but whitespace isn't preserved (could be perhaps?).
Anyway, take it or leave it. Links follow. chad ----- Subversion repository: http://svn.zetadev.com/repos/public/ASTutils/ The relevant method is 'ast2text' in ASTutils.py: http://svn.zetadev.com/repos/public/ASTutils/tags/0.2.0/ASTutils.py API documentation for this method: http://www.zetadev.com/software/ASTutils/latest/api/public/ASTutils.ASTutils-class.html#ast2text API documentation root: http://www.zetadev.com/software/ASTutils/latest/api/ _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com