list - Python 3 FTPLIB, NoneType Errors, and Uploads/Downloads -
list - Python 3 FTPLIB, NoneType Errors, and Uploads/Downloads -
in script want able, in end, able download files in directory , sub-directories... trying ftplib. i'm trying phone call dir of ftp server , set variable, nonetype?! can connect server , when phone call directory = session.dir() displays kind of matrix style output in console files, read/write perms, dates, etc.... when seek print directory seem "none". initial thought each item in directory download them computer, can't seem list of directory!
directory = session.dir() print(str(directory))
sorry long , trivial explanation, have become little bit frustrated.
any help much appreciated!
-clem
first, read this. http://docs.python.org/library/ftplib.html#ftplib.ftp.nlst
then, seek this:
directory = session.nlst() print(directory)
note. don't need print(str(...))
. print function gets string representation you.
python list file-upload download ftplib
Comments
Post a Comment