#!/usr/bin/lua
io.write("Content-type: text/event-stream\nPragma: no-cache\n\n")
io.flush()
local pipe = io.popen(os.execute("python /www/cgi-bin/shell/app.py"))
io.flush()
for line in pipe:lines() do
io.write(line)
io.flush()
end
怎么实时打印 app.py 中打印的消息,现在是运行结束才一次性打印出而不是实时打印
www.trtos.com 极客虫 ,makeymakey,arduboy 爱好者
离线