-->

Monday, April 15, 2013

check if file exists


try:
   with open('filename'): pass
except IOError:
   print 'Oh dear.'

No comments:

Post a Comment