Something that Perl can do that Python can't?

jitu jitendran at productdossier.com
Tue Jul 26 01:56:57 EDT 2005


Donn Cave wrote:
> In article <1122064588.174698.153220 at g43g2000cwa.googlegroups.com>,
>  "Dr. Who" <google at spiceaid.com> wrote:
> > So here it is: handle unbuffered output from a child process.
>
> Your Perl program works the same for me, on MacOS X,
> as your Python program.  That's what we would expect,
> of course, because the problem is with the (Python)
> program on the other end - it's buffering output,
> because the output device is not a terminal.
>
>    Donn Cave, donn at u.washington.edu

Yes Donn's right , works the same for me , bufcallee.py may be should
look like
this

import time
import sys

sysout=sys.stdout

sysout.write("START\n")
sysout.flush()
time.sleep(10)
sysout.write("STOP\n")
sysout.flush()

regards
jitu




More information about the Python-list mailing list