Unbuffered stdout

Gerrit Holl gerrit.holl at pobox.com
Mon Nov 29 11:43:22 EST 1999


leon wrote:
> I use it into a cgi script, with apache, and for my IRC like, I must do
> a thing like :
>     while 1:
>         strLine = self.pRoomFile.readline()
>         while strLine:
>             sys.stdout.write(strLine)
>             sys.stdout.flush()
>         strLine = self.pRoomFile.readline()
>         time.sleep(1)

Are you sure you printed the 'Content-type: text/html\n\n'? And are you
also sure you checked the error logs? Does it run from the command line?

regards,
Gerrit.

-- 
"However, complexity is not always the enemy."

  -- Larry Wall (Open Sources, 1999 O'Reilly and Associates)
  5:42pm  up  2:26, 16 users,  load average: 1.29, 1.29, 1.01




More information about the Python-list mailing list