我腳本化的下載腳本。 運行時會引發錯誤。我的Python腳本中的錯誤在哪裏?
代碼:
import urllib2, shutil
ftpfile = urllib2.urlopen("ftp://user:[email protected]/file.txt")
localfile = open("C:\\dtmp", "wb")
shutil.copyfileobj(ftpfile, localfile)
錯誤:
Traceback (most recent call last):
File "download.py", line 4, in <module>
localfile = open("C:\\dtmp", "wb")
IOError: [Errno 13] Permission denied: 'C:\\dtmp'
請回答... – Zygimantas