1
我在python 2.7中使用了spur,但是由於某種原因它正在搞亂我的文件路徑。這裏是命令:python-spur ssh命令搞亂了文件路徑
import spur
outFile = "'%s'" % outFile
shell = spur.SshShell(hostname=self.run_params["host"], username=self.run_params["username"], password=self.run_params["password"], missing_host_key=spur.ssh.MissingHostKey.accept)
print outFile
result = shell.run(["ln", "-sf", movFile, outFile])
這是print outFile
的輸出:
'/RAIDS/RAID_1/Unmanaged/platform-deliveries-103_1/Content/_GOOGLE/Ninl/NBV_1234-source.mov'
但是當我運行命令我得到這個錯誤與不過outFile:
RunProcessError: return code: 1
output: b''
stderr output: b"ln: creating symbolic link `\\'/RAIDS/RAID_1/Unmanaged/platform-deliveries-103_1/Content/_GOOGLE/Ninl/NBV_1234-source.mov\\'': No such file or directory\n"
是什麼在我的鏈接的開頭和結尾添加\\?