Created
April 4, 2016 19:52
-
-
Save dogancankilment/d2ac716517ae4277a44df180597326be to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ftplib | |
def directory_list(): | |
ftp = ftplib.FTP("yourdomain.com") | |
ftp.login("username", "password") | |
data = [] | |
ftp.dir(data.append) | |
ftp.quit() | |
for line in data: | |
print "-", line | |
if __name__ == '__main__': | |
directory_list() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment