【发布时间】:2018-06-22 04:23:00
【问题描述】:
我有两个处于无限循环中的独立脚本。我需要从另一个主脚本调用它们并让它们同时运行。同时产生结果。
这里有一些脚本
script1.py
y= 1000000000
while True:
y=y-1
print("y is now: ", y)
script2.py
x= 0
while True:
x=x+1
print("x is now: ", x)
目的是用pyinstaller将主脚本编译到一个控制台中
【问题讨论】:
-
你也能写出预期的输出吗
标签: python multithreading