Python Best Practices: Abstract Syntax Trees

Other than the manual and the source code, you are on your own. This subject and python bytecode are very undocumented.

Alternatively you could try using this python bytecode library which I have heard good thing about but haven't tried it yet:

http://code.google.com/p/byteplay/


I think geniusql is doing something along those lines to translate an ast into sql... There was a talk on it but I can't find it - and I'm not allowed to link anyway :-(