我有一個txt文件,如果我嘗試打開它蟒蛇說:文件TXT:FileNotFoundError:[錯誤2]沒有這樣的文件或目錄
runfile('/Users/costanzanaldi/Desktop/tesi/Tesi_Naldi/COdice _Python/untitled0.py', wdir='/Users/costanzanaldi/Desktop/tesi/Tesi_Naldi/COdice _Python')
Traceback (most recent call last):
File "<ipython-input-30-b4bdfdd17ca2>", line 1, in <module>
runfile('/Users/costanzanaldi/Desktop/tesi/Tesi_Naldi/COdice _Python/untitled0.py', wdir='/Users/costanzanaldi/Desktop/tesi/Tesi_Naldi/COdice _Python')
File "/Users/costanzanaldi/anaconda/lib/python3.4/site-packages/spyderlib/widgets/externalshell/sitecustomize.py", line 685, in runfile
execfile(filename, namespace)
File "/Users/costanzanaldi/anaconda/lib/python3.4/site-packages/spyderlib/widgets/externalshell/sitecustomize.py", line 85, in execfile
exec(compile(open(filename, 'rb').read(), filename, 'exec'), namespace)
File "/Users/costanzanaldi/Desktop/tesi/Tesi_Naldi/COdice _Python/untitled0.py", line 13, in <module>
in_file = open("POLO_SCIENTIFICO_(LAMMA).txt","r")
FileNotFoundError: [Errno 2] No such file or directory: 'POLO_SCIENTIFICO_(LAMMA).txt'
1)該文件存在! 2)路徑正確!它在桌面上!
我這樣做了,但輸出是stille錯誤.. – costanza