How to test if a module exists?

Chris Rebert clp2 at rebertia.com
Sat Nov 6 16:54:09 EDT 2010


On Sat, Nov 6, 2010 at 1:01 PM, Mark Wooding <mdw at distorted.org.uk> wrote:
> Chris Rebert <clp2 at rebertia.com> writes:
>
>>     if err.message != "No module named extension_magic_module":
>
> Ugh!  Surely this can break if you use Python with different locale
> settings!

Since when does Python have translated error messages?

Cheers,
Chris



More information about the Python-list mailing list