Recompile AST?

2005-11-10 Thread chrisspen
Is it possible to recompile the AST generated by compiler.parse, back into code or an executable code object? My aim here is to allow a script to manipulate Python code as elements within a list. However, it doesn't look like the module has any native methods designed to do this. Chris -- http:/

Dynamically Update Class Definitions?

2005-11-11 Thread chrisspen
Is there a way to loop through all instantiated objects and update their classes when a source file changes? I know about Michael Hudson's method (http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/160164), but you have to modify all your classes to subclass AutoReloader. Is there something le