win32pipe.popen2 file objects: How to use advanced operations?

Mark Hammond MHammond at skippinet.com.au
Mon Apr 5 19:45:04 EDT 1999


Milton L. Hankins wrote in message ...
>I'm trying to use win32pipe.popen2().
>
>I'd like to be able to set the buffer size of one or more of the file
>objects returned by it.  How does one do this?

Im not sure?

>Also, how does one perform a non-blocking read or write on such a file
>object?

Im pretty sure you can't.

To have this level of control, you probably need to emulate win32popen
yourself - ie, use win32process.CreateProcess, etc.  Then you can use
win32file.CreateFile to perform overlapped IO to perform the non-blocking
reads.

This isnt covered in detail by the win32 extensions help files - all the
functions you need to use are covered, but for the specific techniques of
how to use overlapped IO you must use the windows documentation.

Mark.







More information about the Python-list mailing list