Nebel22
Nebel22

Reputation: 508

socket.fromfd for Windows

I am porting a Python-based web server from Linux to Windows. There is a call to socket.fromfd, which is only available in Unix and I've been trying to find a Windows-equivalent with no luck.

I came upon WinSock and WSADuplicateSocket, but these don't seem to be available in Python based on this post: Can I use the winsock api from python?

I know there is also DuplicateHandle, but it is not reliable for sockets. Is there any reliable way to reproduce socket.fromfd for Windows?

Upvotes: 1

Views: 1233

Answers (1)

jester
jester

Reputation: 3489

I think there is a patch for this issue, for python windows. I haven`t tried it personally, but this link might help : http://bugs.python.org/issue1378

Upvotes: 2

Related Questions