1
import os,pdb
import sys
print os.path.dirname(os.path.realpath(__file__))
pdb.set_trace()
os.chdir('../bci_framework')
D:\baseline\BCI-Comparison-Framework\bci_framework
WindowsError: (2, 'The system cannot find the file specified', '../bci_framework')
爲什麼?該文件夾存在!
什麼是您當前的路徑?就我所知,類UNIX系統上的'..'意味着「返回一個文件夾」。 –
確認窗口也是如此:http://www.7tutorials.com/command-prompt-how-use-basic-commands。也許嘗試將「..」改爲「」。如果你想引用你的當前目錄。 –