Python/Jython - socket.SOL_SOCKET
Ype Kingma
ykingma at accessforall.nl
Thu Dec 19 13:47:10 EST 2002
VLP wrote:
> Very intriguiging problem with SOL_SOCKET in socket
> module in Jython. If I do a "from socket import *", I
> cannot find SOL_SOCKET in my namespace... but if I do
> a "import socket", I can find socket.SOL_SOCKET - No
> such problem in Python. Anyone faced this stuff
> before? Know any fixes? (other than hard-coding an
> assignment to SOL_SOCKET in my module!!).
The Lib/socket.py module that comes with jython contains
the assignment:
__all__ = ['AF_INET', 'SOCK_DGRAM', 'SOCK_RAW', 'SOCK_RDM',
'SOCK_SEQPACKET',
'SOCK_STREAM', 'SocketType', 'error', 'getfqdn', 'gethostbyaddr',
'gethostbyname', 'gethostname', 'socket']
You can fix the bug by adding 'SOL_SOCKET' there.
Regards,
Ype
More information about the Python-list
mailing list