Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #5926

Re: List of WindowsError error codes and meanings

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From Genstein <genstein@invalid.invalid>
Newsgroups comp.lang.python
Subject Re: List of WindowsError error codes and meanings
Date Sat, 21 May 2011 16:35:18 +0100
Organization A noiseless patient Spider
Lines 16
Message-ID <ir8m4b$f16$3@dont-email.me> (permalink)
References <mailman.1847.1305914213.9059.python-list@python.org> <8762p48eel.fsf@pobox.com>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
Injection-Date Sat, 21 May 2011 15:35:40 +0000 (UTC)
Injection-Info mx04.eternal-september.org; posting-host="5Qy2+A/NRBT27JFhmWZN9A"; logging-data="15398"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18S6575MbmQNlo0uheVYwx4MKqgM+F4nM4="
User-Agent Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10
In-Reply-To <8762p48eel.fsf@pobox.com>
Cancel-Lock sha1:sDtEThFpiKv97rVJqCFttYZVDKw=
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:5926

Show key headers only | View raw


> Andrew Berg<bahamutzero8825@gmail.com>  writes:
> Since Python 2.5, the errno attribute maps the Windows error to error
> codes that match the attributes of module errno.

Good point, I completely misread that. At least the Windows error code 
is still available as the winerror attribute.

As an aside - call me stupid, but I don't quite follow the purpose of 
that errno mapping. Surely if the error number can be mapped 
successfully then the error isn't Windows specific and an OSError should 
logically be thrown instead? And if it can't be mapped successfully then 
errno will never be valid so the mapping is pointless?

I guess if the mapping is imprecise then it makes some sense as errno is 
a convenience to avoid people having to grasp the meaning of the many 
and various winerror.h values. So perhaps I've answered my own question.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

List of WindowsError error codes and meanings Andrew Berg <bahamutzero8825@gmail.com> - 2011-05-20 12:56 -0500
  Re: List of WindowsError error codes and meanings Genstein <genstein@invalid.invalid> - 2011-05-20 20:47 +0100
    Re: List of WindowsError error codes and meanings Andrew Berg <bahamutzero8825@gmail.com> - 2011-05-20 16:55 -0500
  Re: List of WindowsError error codes and meanings John J Lee <jjl@pobox.com> - 2011-05-21 12:46 +0100
    Re: List of WindowsError error codes and meanings Genstein <genstein@invalid.invalid> - 2011-05-21 16:35 +0100
      Re: List of WindowsError error codes and meanings John Lee <jjl@pobox.com> - 2011-05-22 17:55 +0000
    Re: List of WindowsError error codes and meanings Andrew Berg <bahamutzero8825@gmail.com> - 2011-05-22 09:35 -0500
  Re: List of WindowsError error codes and meanings Thomas Heller <theller@ctypes.org> - 2011-05-26 17:02 +0200
    Re: List of WindowsError error codes and meanings Andrew Berg <bahamutzero8825@gmail.com> - 2011-05-27 04:22 -0500

csiph-web