使用 QProcess.start() 从不同的文件目录启动脚本

Start script from different file directory using QProcess.start()

我试过查找它,但出于某种原因我找不到任何相关信息。如何通过在 start() 中指定特定文件目录来 运行 脚本?

这有效(当测试与主脚本位于同一文件夹中时):

self.process.start("python3 Test.py")

这不起作用:

self.process.start("python3 /my/path/Test.py")

试试这个:

self.process.start("python3 ../my/path/Test.py") # added two periods before "/m"