是否有可能让Jython使用Unix套接字?

时间:2015-11-30 04:24:31

标签: python sockets jython unix-socket

在Jython 2.7中:

>>>import socket
>>>print socket.AF_UNIX
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'AF_UNIX'

我尝试使用Pyro4和Jython连接到在unix套接字上运行的NameServer。引擎盖下的Pyro4代码与此类似:

family = socket.AF_UNIX
sock = socket.socket(family, socket.SOCK_STREAM)
sock.bind(name)

但是,我收到'module' object has no attribute 'AF_UNIX'错误。

Jython bug report表明这并不是开箱即用的。

是否有可能使这个工作?

0 个答案:

没有答案
相关问题