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=

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 gl

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? >>> >>

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 t

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

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?) -- http://mail.p