Python: changing directory name at FTP server for downloading the file
<p>I am trying to download a file from FTP server. I am able to connect to the server. But not able to change the directory.</p>

<pre><code>#! /user/bin/python33
import os
import ftplib
ftp = ftplib.FTP("ftp.sec.gov")
ftp.login("anonymous", "abcd@yahoo.com")
data = []
ftp.dir(data.append)
ftp.quit()
for line in data:
    print( "-", line)
print(os.getcwd())
path= "/edgar/full-index/2013/"
print(path)
ftp.cwd(path)
</code></pre>

<p>it fails in the last line. can some one suggest what needs to be done"
thanks a lot in advance</p>
