Nonblocking IO on popen pipe (isn't nonblocking)

Donn Cave donn at u.washington.edu
Thu Apr 11 15:39:49 EDT 2002


Quoth "Noah" <noah at noah.org>:
| Damn... The only problem I see with this explaination is
| that this would imply that popen is almost totally useless.
| Why bother opening a pipe with both in and out streams
| if can't actually read and write from both streams?
| I could have sworn that I have seen interactive programs
| such as telnet and ftp scripted from Python.

Pipes are fine for what they're normally used for, but for
circular structures, why bother indeed, as they will fail
in most cases.

| I looked at the pty stuff, but I was going to implement that
| AFTER I got pipes working. Pipes seem to be the most portable
| and intuitive way to solve this problem.
|
| Damnit! If I can do it in Perl I'm sure I can make it work in Python!

If you can explain how you do it in Perl, maybe someone can
tell you what you need in Python.  The buffering problem I was
talking about really has nothing to Python, it would be in ftp.
If ftp won't write its buffered output, then Perl, Python and C
are all in the same boat.

	Donn Cave, donn at u.washington.edu



More information about the Python-list mailing list