try:
ftp=FTP('some_server')
ftp.login()
# more lines
except:
print "An error has occured.\n"
This works fine to supress the errors, but I would like to be able to narrow the errors down so that I can print 'invalid username or password' or 'connection refused' rather than simply 'An error has occured'. How would I go about narrowing down which errors occur?
Thanks in advance
-- http://mail.python.org/mailman/listinfo/python-list