I have an app that yields the output line by line and it works nicely even in Firefox. I'm using webpy 0.31.
If I use yield "foobar\n", it already shows in Firefox window. Not sure how this differs from your test, although... On Tue, Jul 21, 2009 at 9:57 AM, justin davis <[email protected]> wrote: > > 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 > > > -- Arnaldo M Pereira --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
