[Tutor] errno module - was File copying - best way?
fleet@teachout.org
fleet@teachout.org
Mon, 6 Aug 2001 17:04:59 -0400 (EDT)
>From: Kalle Svensson <kalle@gnupung.net>
>Subject: Re: [Tutor] errno module - was File copying - best way?
>
>Sez fleet@teachout.org:
>>
>> I will study this and look at the rest of the exceptions listed for 'os;'
>> but what about the 'errno' module?
>
>The errno module is used for mapping a error code set by a failed C system
>call to a name and the other way around:
>
>>>> try:
>... f = open("/usr/testfile", "w")
>... except IOError, e: <---------------- this was what I was missing!
>... pass
>...
This error, value thing was what I was missing. Things make a lot more sense now!
Thanks all!
- fleet -