Posts in category py3k

Walking a py3k AST

The compiler module has been removed from py3k. Fortunately there's a replacement in the _ast module introduced in Python 2.5. Unfortunately, while the compiler module has a useful __repr__esentation for its AST objects...

Error: Failed to load processor pycon
No macro or processor named 'pycon' found

This is not the case for the _ast module, so here's a function that will dump _ast.AST objects as a dict:

Error: Failed to load processor pycon
No macro or processor named 'pycon' found