try: f = open('bogus.txt','r') except IOError as e: print e
try: f = open('bogus.txt','r') except: print 'Error opening the file.'