[Zope-dev] Alternative to reload()

Michael Haubenwallner michael at d2m.at
Sun Feb 25 04:09:10 EST 2007


Sorry for the crosspost, i think it is of interest to both zope-dev and 
zope3-dev.

Guido van Rossum on Edu-sig mailing list just posted
some code to reload a module in place, updating classes, methods and 
functions.

     [Edu-sig] Reloading code (was Re: OLPC: first thoughts)
     http://mail.python.org/pipermail/edu-sig/2007-February/007787.html

     """Alternative to reload().

     This works by executing the module in a scratch namespace, and then
     patching classes, methods and functions.  This avoids the need to
     patch instances.  New objects are copied into the target namespace.
     """


Michael

-- 
http://zope.org/Members/d2m
http://planetzope.org



More information about the Zope-Dev mailing list