Re: how do you know if open failed?
- From: Fredrik Lundh <fredrik@xxxxxxxxxxxxxx>
- Date: Thu, 28 Sep 2006 20:26:15 +0200
SpreadTooThin wrote:
f = open('myfile.bin', 'rb')
How do I know if there was an error opening my file?
you'll notice:
>>> f = open("myfile.bin", "rb")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
IOError: [Errno 2] No such file or directory: 'myfile.bin'
>>>
</F>
.
- References:
- how do you know if open failed?
- From: SpreadTooThin
- how do you know if open failed?
- Prev by Date: vector and particle effects
- Next by Date: Re: Python and Win95B
- Previous by thread: Re: how do you know if open failed?
- Next by thread: Re: how do you know if open failed?
- Index(es):