A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2014-March/133692.html below:

[Python-Dev] Status of PEP 3145

[Python-Dev] Status of PEP 3145 - Asynchronous I/O for subprocess.popen [Python-Dev] Status of PEP 3145 - Asynchronous I/O for subprocess.popenRichard Oudkerk shibturn at gmail.com
Fri Mar 28 23:09:11 CET 2014
On 28/03/2014 06:35 pm, Josiah Carlson wrote:
>
>     If it were me, I'd define three methods, with longer names to
>     clarify what they do, e.g.
>
>     proc.write_nonblocking(data)
>     data = proc.read_nonblocking()
>     data = proc.read_stderr_nonblocking()
>
>
> Easily doable.
To implement write_nonblocking() on Windows, do you intend to use 
SetNamedPipeHandleState() with PIPE_NOWAIT?  The documentation 
discourages using this:

    Note that nonblocking mode is supported for compatibility with
    Microsoft LAN Manager version 2.0 and should not be used to
    achieve asynchronous input and output (I/O) with named pipes.

And I guess you will need to use a poll/sleep loop to simulate blocking 
or multiplexing.  If you want expect-like behaviour then you need some 
sort of multiplexing.

-- RIchard**
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20140328/2df4b8d3/attachment.html>
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4