module check

dakman at gmail.com dakman at gmail.com
Mon Jan 22 10:06:02 EST 2007


I'm at work so I can't test this, but I do beleive the inspect module
can help you out. If it can't you can always try import the module
in a try-catch statement, catching ImportError, however ImportError may
be raised if the module you imported has trouble loading another
module, but it shouln't be to hard to track down where the ImportError
came from, a traceback object can give a lot more information than you
would beleive.
Victor Polukcht wrote:
> Can anybody suggest a correct way of checking in python module exists
> and correctly installed from python program.




More information about the Python-list mailing list