Nonblocking IO on popen pipe (isn't nonblocking)

Noah noah at noah.org
Thu Apr 11 16:56:49 EDT 2002


Hmm... This sounds suspicious... If FTP won't write its buffered
output then no application could see it -- that includes the shell!
Python shouldn't be any different in what it sees.
If I start FTP from the shell, then how does FTP know 
when to flush the buffer so that you can see it in a shell?
Shells essentially do a fork/exec to start an application.
This is no different than what I should be able to do in Python.
What I'm saying is that if FTP buffers the output and never
flushes it then there would be no way for the shell to see
it either. In fact, we see this all the time with newbie
Python applications that print in a loop, but never flush.
New users wonder why they can't see their output until the 
script is finished.

Yours,
Noah
-----Original Message-----
From: python-list-admin at python.org
[mailto:python-list-admin at python.org]On Behalf Of Donn Cave
Sent: Thursday, April 11, 2002 12:40 PM
To: python-list at python.org
Subject: RE: Nonblocking IO on popen pipe (isn't nonblocking)


Quoth "Noah" <noah at noah.org>:
| Damn... The only problem I see with this explaination is
....
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