开发者

Flushing the output in GAE?

I have tried two different ways of flushing the output to the browser in GAE:

from time import sleep
import sys;
print ""
print "Output"
sys.stdout.flush()
sleep(10)

And:

from time import sleep
self.response.out.write("Output")
self.res开发者_如何学JAVAponse.out.flush()
sleep(10)


You can't flush the output to the browser. App Engine sends the entire response all at once when your handler returns.

Reference: http://code.google.com/appengine/docs/python/runtime.html#Responses

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜