Re: dynamically load from module import xxx

2008-07-02 Thread Gary Duzan
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()

Re: dynamically load from module import xxx

2008-07-02 Thread Guilherme Polo
On Tue, Jul 1, 2008 at 1:46 PM, Gary Duzan [EMAIL PROTECTED] wrote: 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

dynamically load from module import xxx

2008-07-01 Thread Neal Becker
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?) --

Re: dynamically load from module import xxx

2008-07-01 Thread Guilherme Polo
On Tue, Jul 1, 2008 at 12:11 PM, 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

Re: dynamically load from module import xxx

2008-07-01 Thread Neal Becker
Guilherme Polo wrote: On Tue, Jul 1, 2008 at 12:11 PM, 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'

Re: dynamically load from module import xxx

2008-07-01 Thread Guilherme Polo
On Tue, Jul 1, 2008 at 12:55 PM, Neal Becker [EMAIL PROTECTED] wrote: Guilherme Polo wrote: On Tue, Jul 1, 2008 at 12:11 PM, Neal Becker [EMAIL PROTECTED] wrote: What is a good way to emulate: from module import xxx where 'module' is a dynamically generated string? __import__