MindClass wrote:
> Is possible import a library according to a condition?
>
> if Foo = True:
> import bar
>
Did you even try ? Would have been faster than posting here...
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '[EMAIL PROTECTED]'
MindClass wrote:
> Steve Holden wrote:
>
>>I'm guessing that you think this might be necessary to avoid importing
>>the same module multiple times: it's not. Python only runs the module's
>>code the first time the module is imported into a program. A further
>>import statement effectively does not
Steve Holden wrote:
> I'm guessing that you think this might be necessary to avoid importing
> the same module multiple times: it's not. Python only runs the module's
> code the first time the module is imported into a program. A further
> import statement effectively does noting, because the inte
MindClass wrote:
> Georg Brandl wrote:
>
>>MindClass wrote:
>>
>>>Is possible import a library according to a condition?
>>>
>>>if Foo == True:
>>>import bar
>>>
>>
>>Why don't you try it?
>>
>
> I thinked that could be another way for import statement.
>
> In that case I'll have to set a gl
Georg Brandl wrote:
> MindClass wrote:
> > Is possible import a library according to a condition?
> >
> > if Foo == True:
> > import bar
> >
>
> Why don't you try it?
>
I thinked that could be another way for import statement.
In that case I'll have to set a global variable before of the impo
MindClass wrote:
> Is possible import a library according to a condition?
>
> if Foo = True:
> import bar
>
Why don't you try it?
(in the above code, not the import is the problem, but using the
assignment operator in an expression)
Georg
--
http://mail.python.org/mailman/listinfo/python-