2014-01-14 36 views

回答

0
path='\\\\WALL-E\\RedirectedFolders\\rmarshall\\My Documents\\Downloads\\' 
+1

爲什麼不使用原始字符串? 'r'\\ WALL-E \ RedirectedFolders \ rmarshall \ My Documents \ Downloads'' – falsetru

+1

如果你需要一個'r'\\ WALL-E \ RedirectedFolders \ rmarshall \ My Documents \ Downloads''尾隨反斜槓。 (字符串文字串聯) – falsetru

0

我想你是在windows中這樣做的。假設你可以做的是: - 轉到Windows下載文件夾。 - 單擊地址欄,這將給你這樣的:

C:\Users\TomHarris\Documents\ViberDownloads 

附加您指定的文件名的最後一個以上。

C:\Users\TomHarris\Documents\ViberDownloads\MYFILETOOPEN 

雖然我認爲無論是回斜線和正斜槓應該工作正常(我不知道,雖然,檢查它!),文件輸入蟒蛇如下公約,這樣的事情:

fname= "/WALL-E/RedirectedFolders/myname/My Documents/Downloads"