我正在构建flask应用程序,以便实现以下功能:
print('')
打印输出。你知道吗我搜索了很多关于多线程,进程,芹菜,但似乎我找不到一个解决方案来实现以上。你知道吗
到目前为止的最新情况:
pp=None
@simple_page.route('/stop')
def stopApp():
pp.join()
@simple_page.route('/run')
def runApp():
pp = Process(target=theAppLoop, args=('',))
pp.daemon = True
pp.start()
@simple_page.route('/update')
def updateMonitor():
#return pp's print('')?
def theAppLoop(s):
while True:
run_cycle()
def run_cycle():
#call others func and those func will do print('')
经过几次搜索之后,对于“flask”问题,运行循环并用html更新其输出 “,我用套接字解决
相关问题 更多 >
编程相关推荐