[Python-Dev] AST manipulation and source code generation
Chad Whitacre
chad at zetaweb.com
Wed May 25 20:31:34 CEST 2005
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/
More information about the Python-Dev
mailing list