Compiler.ast helper function "literal_eval" in python 2.4

Sean Talts xitrium at gmail.com
Fri Sep 4 17:43:28 EDT 2009


Hi,

I'm trying to parse some python with the compiler module, select a
subset of the AST returned, and then evaluate that subset, all in
python 2.4.  It seems like in python 2.6 the compiler.ast.literal_eval
function may be what I'm looking for, but unfortunately for my project
we are restricted to using 2.4.  I was wondering if there was some way
programmers performed this way back when?

Thanks,
Sean



More information about the Python-list mailing list