[Python-ideas] Tulip / PEP 3156 - subprocess events
Guido van Rossum
guido at python.org
Wed Jan 16 19:22:21 CET 2013
On Wed, Jan 16, 2013 at 10:20 AM, Geert Jansen <geertj at gmail.com> wrote:
> On Wed, Jan 16, 2013 at 8:10 PM, Paul Moore <p.f.moore at gmail.com> wrote:
>
> > I'll have a look. There *is* one problem, though - I imagine it will
> > be relatively easy to put something together that works on Unix, as
> > waiting on pipes is covered by the existing select/poll mechanisms.
> > But I'm on Windows, so I won't be able to test it. And on Windows,
> > there's no mechanism in place to wait on arbitrary filehandles, so the
> > process wait mechanism is a much harder nut to crack. Chicken and egg
> > problem...
> >
> > Maybe I'll start by looking at waiting on arbitrary filehandles, and
> > use that to build the process approach. Unfortunately, I don't think
> > IOCP is any more able to wait on arbitrary files than select - see my
> > followup to an older thread on Richard's work there. Or maybe I'll set
> > up a hacking environment in a Linux VM or something. That'd be a fun
> > experience in any case.
>
> Dealing with subprocesses on Windows in a non-blocking way is a royal
> pain. As far as I know, the only option is to use named pipes and
> block on them using a thread pool. A few years back I wrote something
> that did this, see the link below. However it ain't pretty..
>
> https://bitbucket.org/geertj/winpexpect/src/tip/lib/winpexpect.py
>
Hm, doesn't IOCP support named pipes?
--
--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130116/bc2be898/attachment.html>
More information about the Python-ideas
mailing list