A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-May/079511.html below:

[Python-Dev] Symbolic errno values in error messages

[Python-Dev] Symbolic errno values in error messages [Python-Dev] Symbolic errno values in error messagesAlexander Belopolsky alexander.belopolsky at gmail.com
Fri May 16 16:39:13 CEST 2008
On Fri, May 16, 2008 at 10:15 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> Alexander Belopolsky wrote:
..
>> Use standard C library char* strerror(int errnum) function.   You can see
>> an example usage in Modules/posixmodule.c (posix_strerror).
>
> I don't believe that would provide adequate Windows support.
>

Until recently, python had its own cross-platform implementation of
strerror, but it was removed because it was deemed redundant.  This
tells me that it should work on windows.   On the other hand, IOError
object and in fact EnvironmentError object already has strerror member
which is printed when available:

>>> 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?
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4