Using sys.stdin in select.select on Windows [duplicate] Using sys.stdin in select.select on Windows [duplicate] windows windows

Using sys.stdin in select.select on Windows [duplicate]


On Windows select is only defined for sockets, and will not work for arbitrary file handles (windows has no concept of file descriptors). For more information about this issue, see the msdn documentation, it is also mentioned in the python documentation for the select module.

If you want to use polling for arbitary files, you should look into something that abstracts polling sockets and file handles. This might be the twisted reactor referred to in a comment to your post, or it might be a python binding to libuv, or some other event library of your choice.