首页 > 解决方案 > 一次打开多个python程序

问题描述

我目前正在尝试在 python 中创建一个同时打开其他 python 文件的程序。但这似乎不起作用。我正在尝试运行的程序是 While True 循环,因此它们永远运行,因此它只运行第一个,同时等待它完成运行下一个。我该怎么做才能让他们都跑?

我的程序运行所有这些的代码如下。

对不起,如果这没有多大意义

os.system("python program1.py")
os.system("python program2.py")
os.system("python program3.py")
os.system("python program4.py")
os.system("python program5.py")
os.system("python program6.py")
os.system("python program7.py")

标签: pythonpython-3.x

解决方案


推荐阅读