开发者

Flushing the output in GAE?

开发者 https://www.devze.com 2023-03-31 03:49 出处:网络
I have tried two different ways of flushing the output to the browser in GAE: from time import sleep import sys;

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

精彩评论

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