Re: "Streaming" CGI output

2001-06-29 Thread David Ascher
> From: "Joshua Hewitt" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Friday, June 29, 2001 5:53 AM > Subject: "Streaming" CGI output > > > I was wondering how to output text to a client browser little-by-little, eg >something like: >

Re: "Streaming" CGI output

2001-06-29 Thread Noah
This is a buffering issue. Flush stdout: sys.stdout.flush() after every print call. Be sure to import sys first. Yours, Noah - Original Message - From: "Joshua Hewitt" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, June 29, 2001 5:53 AM Subject: "

"Streaming" CGI output

2001-06-29 Thread Joshua Hewitt
I was wondering how to output text to a client browser little-by-little, eg something like: #little-by-little.cgi print httpheader+'\n' print 'start' for i in range(n): time.sleep(1) print (i+1)+' seconds' If I do the above code it waits 4 seconds and then splashes all the text