S
SpreadTooThin
f = open('myfile.bin', 'rb')
How do I know if there was an error opening my file?
How do I know if there was an error opening my file?
try:SpreadTooThin said:f = open('myfile.bin', 'rb')
How do I know if there was an error opening my file?
SpreadTooThin said:f = open('myfile.bin', 'rb')
How do I know if there was an error opening my file?
f = open('myfile.bin', 'rb')
How do I know if there was an error opening my file?
tobiah said:try:
open('noexist')
except:
print "Didn't open"
try:
open('noexist')
except:
print "Didn't open"
Traceback (most recent call last):f = open('myfile.bin', 'rb')
How do I know if there was an error opening my file?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.