/ Published in: Python
Expand |
Embed | Plain Text
try: file = open("testfile", 'r') print "File exists." file.close() except IOError: print "File does not exist."
You need to login to post a comment.
fnurl on 04/05/09
1 person have marked this snippet as a favorite
try: file = open("testfile", 'r') print "File exists." file.close() except IOError: print "File does not exist."
You need to login to post a comment.