this is also fine with me. From the the linked discussion I think it's the only solution.

best wishes,

On 6/30/07, Alan Kennedy <> wrote:
Dear all,

I'm writing to seek input on how to deal with two error conditions that
can arise with the socket and select modules that are not covered by
existing constants in the errno module.

1. jython/java has a limitation that channels can only be
multiplexed/select'ed if they are in non-blocking mode. If the user
attempts to register a socket in blocking mode, they currently get a
java IllegalBlockingModeException.

I would like to map this to a more pythonic select.error message, which
is straightforward. However, there is no suitable symbolic constant in
the errno module (which is derived from cpython), because cpython does
not have the same blocking/non-blocking restriction.

I have documented this restriction on the select module wiki page

So this would require a jython-specific errno.SYMBOLIC_CONSTANT for the
scenario. Unless someone has a suggestion on which existing errno to use?

2. When a non-existent hostname is passed to the socket.getaddrinfo
function, an exception is raised, with an errno that has no
corresponding symbolic constant in the errno module.

I raised this one on python-dev, to see if there was a supposed to be a
corresponding symbolic constant in the errno module, but didn't get any
specific information.

So I'm open to suggestions on both of these issues.

Or should I just go ahead and invent some new error codes?



This email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
Jython-dev mailing list