- and it provides for an application level
module loader. Zope is using this feature to implement
so called "ZClasses", classes the code of which are maintained
inside the ZODB.
Thus, this is a case similar to yours
(your dynamic modules correspond to code maintained in the ZODB).
This impl
On Wed, 21 Aug 2013, Prasad, Ramit wrote:
Fredrik Tolf wrote:
[...]
I considered trying to create subclasses of the pickler and unpickler that
pickle a reference to a module loader and data for the particular module
along with a class that comes from such a module, by overriding
Pickler.save_glo
Fredrik Tolf wrote:
>
> Dear list,
>
> I have a system in which I load modules dynamically every now and then
> (that is, creating a module with types.ModuleType, compiling the code for
> the module and then executing it in the module with exec()), and where I
> would wish to be able to have clas
Dear list,
I have a system in which I load modules dynamically every now and then
(that is, creating a module with types.ModuleType, compiling the code for
the module and then executing it in the module with exec()), and where I
would wish to be able to have classes in those modules containing
What is the best way to add a modules loaded with __import__() to the
global namespace? Example:
foo = __import__( 'foo', globals(), locals(), ['*'] )
PS: what exactly are the parameters globals and locals used for?
--
http://mail.python.org/mailman/listinfo/python-list