[Python-Dev] subprocess crossplatformness and async communication (original) (raw)

Nick Coghlan ncoghlan at gmail.com
Tue Jan 27 00:58:42 CET 2009


Andrew Bennetts wrote:

Daniel Stutzbach wrote: [...]

If you really need to communicate with multiple subprocesses (which so far has not been suggested as a motivating example), then you can use select(). Not portably. select() on windows only works on sockets.

In addition, select() is exactly what the linked recipe uses to implement non-blocking I/O for subprocesses on non-Windows platforms.

I agree the actual use cases need to be better articulated in any RFE that is actually posted, but a cleanly encapsulated approach to non-blocking communication with subprocesses over stdin/out/err certainly sounds like something that could reasonably be added to the subprocess module.

Cheers, Nick.

-- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia



More information about the Python-Dev mailing list