calling method on dynamically loaded module
Sean 'Shaleh' Perry
shalehperry at home.com
Mon Nov 26 17:16:21 EST 2001
On 26-Nov-2001 Eric Cifreo wrote:
> Hello all,
>
> I'm trying to dynamically load a set of modules and then call a specific
> method on each one. For now there's only one module in the list.
> The module seems to be loading correctly, but then the method is not found.
> There IS a 'perform' method defined in the loaded module.
>
evil code I have:
d = {}
exec $mod in d
d['perform'}
I could not find the actual code for this on my system, I have it in cvs though
so if you want it I can mail it to you.
Basically it imports all the symbols into the dictionary, then you can use the
symbols as you see fit.
More information about the Python-list
mailing list