Non-blocking subprocess call
Josiah Carlson
josiah.carlson at sbcglobal.net
Sat Jun 2 16:37:54 EDT 2007
Kevin Walzer wrote:
> I'm currently using os.popen in an application of mine, which calls for
> non-blocking data, in this fashion:
>
> self.file = os.popen('echo %s | sudo -S /sw/bin/fink -y install %s' %
> (self.passtext, self.packagename), 'r', os.O_NONBLOCK)
>
> What is the equivalent/comparable call in the new subprocess module? I
> can't find any reference in the Python docs to non-blocking streams.
If you are talking about non-blocking reading and writing from the
subprocess, there isn't natively. But there is a cookbook entry:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/440554
- Josiah
More information about the Python-list
mailing list