[python-win32] WSAAsyncSelect
Tim Roberts
timr at probo.com
Fri Jan 7 19:44:43 CET 2011
david.briant at ubs.com wrote:
> Does anyone know of any links where blocking I/O calls are demonstrated
> in pure python?
Virtually all I/O calls in pure Python are blocking calls. Did you mean
to ask about non-blocking I/O?
> I'm currently parsing the c code for _socket.pyd and reading up on
> Py_BEGIN_ALLOW_THREADS and Py_END_ALLOW_THREADS. My goal is basically to
> produce a high performance socket that I can use with a Windows UI
> (wxpython) - so was thinking of calling ws2_32.dll but it looks like I
> might need to be a bit more careful.
Well, any time I hear "high performance," I start to wonder whether
Python is really the right choice. How much performance do you need?
WSAAsyncSelect is a pretty snazzy way to deal with a socket server, and
I suspect it could be adapted here without much trouble.
--
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
More information about the python-win32
mailing list