How to test if a module exists?

Mark Wooding mdw at distorted.org.uk
Sat Nov 6 16:01:17 EDT 2010


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!

-- [mdw]



More information about the Python-list mailing list