Python/Jython - socket.SOL_SOCKET

VLP vlprasad at yahoo.com
Thu Dec 19 21:04:15 EST 2002


Ype Kingma <ykingma at accessforall.nl> wrote in message news:<3e02177b$0$996$e4fe514c at dreader7.news.xs4all.nl>...
> 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

Thanks a lot... this works great.



More information about the Python-list mailing list