portable fork+exec/spawn
Nick Craig-Wood
nick at craig-wood.com
Sat May 3 05:30:03 EDT 2008
Jean-Paul Calderone <exarkun at divmod.com> wrote:
> >For jobs which require interactivity ie send input, receive output,
> >send input, receive output, ... it doesn't work well. There isn't a
> >good cross platform solution for this yet. pyexpect works well under
> >unix and is hopefully being ported to windows soon.
>
> There is a good cross-platform solution, in fact. It's Twisted's
> spawnProcess API, which works on POSIX and Windows, supports supports
> sending and receiving, and doesn't have deadlock issues since it's
> event-driven.
It took me a while but I found the documentation on this eventually
http://twistedmatrix.com/documents/current/api/twisted.internet.interfaces.IReactorProcess.html
Looks interesting - I'll have to try it next time I'm reaching for
pexpect
Thanks
Nick
--
Nick Craig-Wood <nick at craig-wood.com> -- http://www.craig-wood.com/nick
More information about the Python-list
mailing list