Conditional Import
Bertrand Geston
bergeston at yahoo.fr
Thu Mar 14 14:02:43 EST 2002
"Aahz" <aahz at pythoncraft.com> wrote in message
news:a6qr70$cg8$1 at panix1.panix.com...
> In article <mailman.1016126245.18593.python-list at python.org>,
> Gustavo Cordova <gcordova at hebmex.com> wrote:
> >
> > from exceptions import ImportError
> > try:
> > from codeop import CommandCompiler
> > except ImportError:
> > from MockCommandCompiler import CommandCompiler
>
> Exceptions are automatically imported; no need for the first line.
> --
> Aahz (aahz at pythoncraft.com) <*>
http://www.pythoncraft.com/
>
> The best way to get information on Usenet is not to ask a question, but
> to post the wrong information. --Aahz
... and you just proved it :-) (I mean that "the best way to get information
on Usenet ....")
More information about the Python-list
mailing list