[Tutor] __import__()
Jojo Mwebaze
jojo.mwebaze at gmail.com
Thu Sep 30 11:47:55 CEST 2010
On Thu, Sep 23, 2010 at 5:26 PM, Pete <pkoek11 at xs4all.nl> wrote:
> Hiya,
>
> still working on my plugin architecture. I figured out how to import
> modules of which I don't know the name yet at compile time,
> by using __import__() instead of import.
>
> So that works fine when I want to have the equivalent of
>
> import spam
>
> ... by using
>
> __import__('spam')
>
> Question:
>
> what is the equivalent of
>
> from spam import *
>
may be
function = getattr(spam, function_name)
J.
> ?
>
> thanks,
>
> Pete
> _______________________________________________
> Tutor maillist - Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20100930/8afc2a69/attachment.html>
More information about the Tutor
mailing list