On Fri, May 16, 2008 at 10:52 AM, Yannick Gingras <[EMAIL PROTECTED]> wrote:
> "Alexander Belopolsky" <[EMAIL PROTECTED]> writes:
>
>>>>> try:
>> ... open('/')
>> ... except Exception,e:
>> ... pass
>> ...
>>>>> print e
>> [Errno 21] Is a directory
>>
>> So now I am not sure what OP is proposing. Do you want to replace 21
>> with EISDIR in the above?
>
> Yes, that's what I had in mind.
>
Then, check out EnvironmentError_str in Objects/exceptions.c. You
should be able import the errno module and fetch its errorcode
dictionary.
-- Alexandre
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com