import subprocess subprocess.run(["Tests.exe"])
我就是这么过来的。我在 Python 控制台上获得了 exe 文件的结果,但尝试将结果保存在文本文件中并以错误结尾。