Not sure if this helps, but I've found that firefox needs to "fill up
your screen" before displaying streamed data.  Try doing something
like:

while True:
    print "hello\n"
    sleep(0.1)

Check that out and see if after a few seconds it starts streaming
correctly.  I found this out with FF 3, so it might be different now,
but I believe it's still valid.

Good luck!

On Jul 20, 11:38 pm, Severin <[email protected]> wrote:
> thanks!
>
> I get it working with curl. But not with firefox (or any other
> browser). I think we somehow need to flush the output, any ideas?
>
> -Severin
>
> On Jul 19, 11:31 pm, Anand Chitipothu <[email protected]> wrote:
>
> > 2009/7/20 Severin <[email protected]>:
>
> > > Hi Anand,
>
> > > I tried this with no success. It waits for 1 second and then displays
> > > two hellos at once.
>
> > > -Severin
>
> > It seems to be working if '\n' is added to hello.
>
> > class timed:
> >    def GET(self):
> >        print 'hello\n'
> >        sleep(1) # sleep for a second
> >        print 'hello\n'
>
> > I think this is happening because the browser/curl works with line
> > buffering. Disabling line buffing in curl makes it work without adding
> > new lines.
>
> > Try:
>
> >     $ curl -N 'http://0.0.0.0:8080/'
>
> > Anand
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to