def background_test(self):
self.running = True
proc = subprocess.Popen('echo hello', shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
while True:
line = proc.stdout.readline()
if line == '':
break
print line
for client in ProgressHandler.clients:
client.write_message(line)
self.output = self.output + line
self.running = False
评论列表
文章目录