我使用os.system()来运行命令行:
os.system(PathIDM + ' /d ' + URL)但是它抛出了一个错误:
'C:\Program' is not recognized as an internal or external command, operable program or batch file.我该怎么解决它?
发布于 2015-12-12 22:50:16
引用PathIDM,以便将程序路径识别为整体,而不是仅识别C:\Program部分:
os.system('"{}" /d {}'.format(PathIDM, URL))或者改用subprocess.call:
import subprocess
subprocess.call([PathIDM, '/d', URL])https://stackoverflow.com/questions/34241115
复制相似问题