Dynamically Update Class Definitions?
chrisspen at gmail.com
chrisspen at gmail.com
Fri Nov 11 13:11:48 EST 2005
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 less intrusive (visitor pattern?) that you can use like
update(old_class, new_class) to automagically do the work?
Chris
More information about the Python-list
mailing list