Automatic reloading, metaclasses, and pickle

Ziga Seilnacht ziga.seilnacht at gmail.com
Tue Feb 27 18:23:25 EST 2007


Andrew Felch wrote:

> I pasted the code into mine and replaced the old.  It seems not to
> work for either unpickled objects or new objects.  I add methods to a
> class that inherits from AutoReloader and reload the module, but the
> new methods are not callable on the old objects.  Man!  It seems we're
> so close, it will be huge if this ends up working.  This stuff is so
> over my head, I wish I could help in some additional way.
>
> -Andrew

Did you copy and paste the entire module? I fiddled almost all parts
of
the original code. I did some base testing and it worked for me. Could
you post the traceback? Note that Google Groups messed up indentation;
in MetaAutoReloader.__init__, the line starting with
cls.__instance_refs__ should be at the same level as previous line.

Did you restart Python? InstanceTracker, MetaInstanceTracker and
MetaAutoReloader are not auto reloaded :).

Ziga




More information about the Python-list mailing list