module check

Larry Bates larry.bates at websafe.com
Mon Jan 22 17:49:06 EST 2007


Victor Polukcht wrote:
> Can anybody suggest a correct way of checking in python module exists
> and correctly installed from python program.
> 

Not sure I understand the question, but I'll try:

try: import yourmodule
except:
    print "Can't import yourmodule"


-Larry



More information about the Python-list mailing list