here is my code:
import ftputil
import urllib2
a_host = ftputil.FTPHost(hostname, username,passw)
for (dirname, subdirs, files) in a_host.walk("/"): # directory
for f in files:
if f.endswith('txt'):
htmlfile = open(f, 'r')
readfile = htmlfile.read()
I think it should be ok, but I got an error
Traceback (most recent call last):
htmlfile = open(f, 'r')
IOError: [Errno 2] No such file or directory: u'readme.txt'
where is the problem?