Re: [Python-Dev] Return error codes from getaddrinfo.

2007-06-28 Thread Martin v. Löwis
> [Martin] >> That will be very difficult to achieve, as Python is (deliberately) >> not even consistent across systems. Instead, it reports what the >> platform reports, so you should do the same in Java. > > Do these examples make it clearer why and in what way I want the jython > errno symbolic

Re: [Python-Dev] Return error codes from getaddrinfo.

2007-06-28 Thread Alan Kennedy
[Alan] >>I want jython to use the same errno symbolic constants as cpython, to >>ease portability of code. [Martin] > That will be very difficult to achieve, as Python is (deliberately) > not even consistent across systems. Instead, it reports what the > platform reports, so you should do the sam

Re: [Python-Dev] Return error codes from getaddrinfo.

2007-06-27 Thread Martin v. Löwis
> Is there supposed to be symbolic constants in the errno module > corresponding to getaddrinfo errors? No. On Windows, there is a separate set of error codes, winerror.h If you google for "winerror 11001", you find quickly that it is "host not found". > I want jython to use the same errno symb

[Python-Dev] Return error codes from getaddrinfo.

2007-06-27 Thread Alan Kennedy
Dear all, I'm seeking enlightenment on the error codes returned by the socket.getaddrinfo() function. Consider the following on python 2.5 on Windows >>> import urllib >>> urllib.urlopen("http://nonexistent";) [snip traceback] IOError: [Errno socket error] (11001, 'getaddrinfo failed') So