1
import sys
import os
import shutil
def main(argv):
if len(argv) < 3:
print("To few arguments")
return 1
dir = os.path.dirname(__file__)
latencyMonitorDir = argv[1]
feedManagerDir = argv[2]
if not os.path.exists(dir + r"\Data"):
os.makedirs(dir + r"\Data")
if not os.path.exists(dir + r"\Data\Result"):
os.makedirs(dir + r"\Data\Result")
scriptCommand = "\"" + dir + "\\script.py\" " + latencyMonitorDir
os.system(scriptCommand)
if not os.path.isfile("\"" + dir + "\\Data\\BoostedFeedManager.exe\""):
shutil.copy(feedManagerDir + r"\BoostedFeedManager.exe", dir + "\Data")
scriptCommand = "\"" + dir + "\\Data\\BoostedFeedManager.exe\" " + "\"" + dir + "\\Data\\configInstruments.json\""
print("debug")
print(scriptCommand)
os.system(scriptCommand) # Error
return 0
if __name__ == "__main__":
sys.exit(main(sys.argv))
它使錯誤:Python的錯誤:路徑不被識別爲一個內部或外部命令,可操作的程序或批處理文件
path is not recognized as an internal or external command, operable program or batch file.
當我不報價添加路徑這個錯誤出現,但我正在做。錯誤的位置用「#Error」表示。
特別是,你應該檢查'shutil.copy(feedManagerDir + r「\ BoostedFeedManager.exe」,dir +「\ Data」)'行' – Caleth