ZOMG, that's me!
to fix it.
class js(object):
def GET(self, name):
yield "<html><body>"
for i in xrange(1000):
time.sleep(1)
load = getloadavg()
yield render.js(*load)
yield "</html></body>"
remove "web.flush()"
and replace "print" by "yield"
iframe is interesting when you need to update very frequently a page
(like the Y! stock charts page). I.e. Bayeux put it as a fallback and
I agree with it.
"long-polling
callback-polling
iframe
flash"
-- http://svn.cometd.com/trunk/bayeux/bayeux.html#toc_30
long-polling (http://yoan.dosimple.ch/blog/2008/02/28/) is much more
interesting, and callback-polling (<script /> instead of XHR) enables
cross-domain calls has well.
Cheers,
-- Yoan
On Tue, May 27, 2008 at 7:22 AM, paul jobs <[EMAIL PROTECTED]> wrote:
> http://yoan.dosimple.ch/blog/2007/11/30/
>
>
> class js(object):
> def GET(self, name):
> web.header('Content-type', 'text/html')
> yield web.flush()
> print "<html><body>"
> for i in xrange(1000):
> time.sleep(1)
> load = getloadavg()
> print render.js(*load)
> print "</html></body>"
>
>
>
> how do we write this in webpy
>
> thanks a lot
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---