在cygwin控制台下:
$ python3.8
Python 3.8.7 (default, Jan 26 2021, 07:37:32)
[GCC 10.2.0] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
```>>> import socket as s```>>> s.socketpair()文件"\",第1行
文件"/usr/lib/python3.8/socket.py",第571行,位于套接字对
```a, b = _socket.socketpair(family, type, proto)```SystemError:返回NULL而不设置错误
但是..。
$ python2.7
Python 2.7.18 (default, Jan 2 2021, 09:22:32)
[GCC 10.2.0] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
```>>> import socket as s```>>> s.socketpair()(<套接字对象、fd=3、family=1、type=1、protocol=0>、
( protocol=0>)
我不知道去哪里找!:(
THX
发布于 2021-02-01 09:59:41
新版本实现了与您的想法类似的解决方案。
https://sourceware.org/pipermail/cygwin/2021-February/247684.html
https://stackoverflow.com/questions/65981854
复制相似问题