Import if condition is correct

Bruno Desthuilliers onurb at xiludom.gro
Mon Oct 30 05:11:09 EST 2006


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 'onurb at xiludom.gro'.split('@')])"



More information about the Python-list mailing list