Claus Tondering wrote:
>I understand that you can use the imp module to programmatically mimic
> the "import xyzzy" statement.
"imp" sounds like overkill for that purpose; the usual way is do do that is to
explicitly call __import__:
xyzzy = __import__("xyzzy")
> But is there any way to programmatically mimic the "from xyzzy import
> *" statment?
you can use getattr() to pick out the objects your need. or you could do
something like:
globals().update(vars(__import__("xyzzy")))
</F>
--
http://mail.python.org/mailman/listinfo/python-list