所以我有一个使用subprocess.popen方法的代码,我想在设置上传递一个字符串路径,但是我不知道怎么做
这是我的密码:
screenCommand = rep_reference+"\osgedit\osgviewer.exe "
iterationsPath = str(path + "\sreplace.osg")
command = "{0} --screen 0 --window 0 0 1920 1080 path+\sreplace.osg {1} " .format(screenCommand, listFix[e])
process = subprocess.Popen(command)
time.sleep(3.0)
process.kill()
如何在我的命令设置中设置iterationsPath变量的路径
您可以将列表中的各种参数和选项与命令一起传递
例如,要在当前目录中打开VSCode,请在shell中执行以下操作:
使用
subprocess.Popen()
(或subprocess.call()
):实际上,您可以将shell命令按空格拆分
从文件中
https://docs.python.org/3/library/subprocess.html#subprocess.Popen
相关问题 更多 >
编程相关推荐