How to reload a module in embedded C

Skip Montanaro skip at pobox.com
Fri Jun 22 14:32:56 EDT 2001


    Emmanuel> I would like to reload a module, AND the module that are used
    Emmanuel> in this module.

Are you trying to reload an extension module written in C?  I don't think
that's supported.  In any case, even if your Camera module is written in C,
reloading it won't recursively reload the modules it imports.  You'd have to
grovel around in Camera's __dict__ and locate the objects there that are
modules, then call PyImport_ReloadModule for them, etc.  Then you have the
problem of locating modules that are imported within functions.

-- 
Skip Montanaro (skip at pobox.com)
(847)971-7098




More information about the Python-list mailing list