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

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -