[英]Python: AttributeError: 'module' object has no attribute 'socketpair'
I wanna try " socketpair
" function in my "discovering and studying" python program language. 我想在我的“发现和学习”python程序语言中尝试“
socketpair
”功能。 Im creating socketpair with following command: 我使用以下命令创建socketpair:
import socket
parent, child = socket.socketpair()
and then I get error: Python: AttributeError: 'module' object has no attribute 'socketpair'
然后我得到错误:
Python: AttributeError: 'module' object has no attribute 'socketpair'
Im working in eclipse, in windows. 我在日食,在窗户工作。 I suppouse socketpair working only in UNIX enviroment, but socket module should include
socketpair
anyway. 我支持socketpair仅在UNIX环境中工作,但socket模块应该包括
socketpair
。
How should I fix it? 我该如何解决?
thanks 谢谢
Regards 问候
At the moment this is not available on Windows, but it is in development, as you can see in related bug . 目前这在Windows上不可用,但它正在开发中,正如您可以在相关的bug中看到的那样。
You can find workaround over the net, like here: http://code.activestate.com/recipes/525487-extending-socketsocketpair-to-work-on-windows/ 您可以通过网络找到解决方法,例如: http : //code.activestate.com/recipes/525487-extending-socketsocketpair-to-work-on-windows/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.