In article <[EMAIL PROTECTED]>,
Neal Becker <[EMAIL PROTECTED]> wrote:
>What is a good way to emulate:
>
>from module import xxx
>where 'module' is a dynamically generated string?
>
>__import__ ('modulename', fromlist=['xxx'])
>
>seems to be what I want, but then it seems 'xxx' is not placed in globals()
>(which makes me wonder, what exactly did fromlist do?)
You might want to read what "help(__import__)" tells you. It
sounds like what you want is:
mynamespace['xxx'] = __import__('modulename.xxx', fromlist=['xxx'])
Seems a bit weird to me, but that's the way it is, and I'm sure
there is a reason for it.
Good luck.
Gary Duzan
Motorola H&NM
--
http://mail.python.org/mailman/listinfo/python-list