Handling import errors

Guillaume Martel-Genest guillaumemg at gmail.com
Tue Jun 21 16:41:35 EDT 2011


What is the pythonic way to handle imports error? What is bugging me
is that the imports can't be inside a function (because I use them in
different places in the script and thus they have to be in the global
scope). I would write something like:

try:



More information about the Python-list mailing list