popen3 on windows and interactive subprocesses

David Bolen db3l at fitlinxx.com
Thu Dec 13 22:01:56 EST 2001


bsturk at news.rcn.com (Brian Sturk) writes:

> Just as test I tried running python -u in this environment and
> got some output but it looked like garbage, I can look into that
> so at least I can support running python with -u.  I'm wondering
> if there are any Windows APIs I could use that would get me
> the data?

I don't think so - regardless of how you execute and connect to the
process (the popen() calls under Windows eventually just call
CreateProcess anyway), it's the executed application itself that is
making the buffering choices based on the file handle representing
stdin.  So unless the application itself provides some control over
this, there's very little you can do from the outside, Windows API or
not.

--
-- David
-- 
/-----------------------------------------------------------------------\
 \               David Bolen            \   E-mail: db3l at fitlinxx.com  /
  |             FitLinxx, Inc.            \  Phone: (203) 708-5192    |
 /  860 Canal Street, Stamford, CT  06902   \  Fax: (203) 316-5150     \
\-----------------------------------------------------------------------/



More information about the Python-list mailing list