Possible Duplicate:
Can select() be used with files in Python under Windows?
On UNIX I am able to pass sys.stdin
to select.select
in Python. I am attempting to do this on Windows, but select.select
in Python on Windows will not allow it.
To more accurately describe what I am doing see https://github.com/eldarion/gondor-client/blob/ccbbf9d4b61ecbc2f66f510b993eb5fba0d81c09/gondor/run.py.
The unix_run_poll
function is what I am trying to accomplish on Windows. The basic idea is that I have a socket connection to a server which has hooked up streaming stdin, stdout, stderr to a process running remotely and I am interacting with it from the local client and making it appear as if the local client is running the process.
The win32_run_poll
is my attempt at porting it to Windows and it does work, sort of. It is a little wonky and the approach, IMO, is very bad.
Does anyone have suggestions on how this can be improved? The dependency on win32api is less than ideal, but I am okay with keeping it.