from spam import eggs, spam at runtime, how?

Lonnie Princehouse fnord at u.washington.edu
Wed Dec 10 06:57:35 CET 2003


You might also have a look at the imp module.
(http://www.python.org/doc/current/lib/module-imp.html).

It may be overkill for what you're trying to do, but I've found it to
be quite useful for dynamic module manipulation.


-ljp


Rene Pijlman <reply.in.the.newsgroup at my.address.is.invalid> wrote in message news:<br99tv8mgguso67p2a8h8p8sctr2o7olse at 4ax.com>...
> How do I do:
> 
>    from spam import eggs
> 
> ... when 'spam' is only known at runtime?




More information about the Python-list mailing list