Skip to content

Instantly share code, notes, and snippets.

@dogancankilment
Created April 4, 2016 19:52
Show Gist options
  • Save dogancankilment/d2ac716517ae4277a44df180597326be to your computer and use it in GitHub Desktop.
Save dogancankilment/d2ac716517ae4277a44df180597326be to your computer and use it in GitHub Desktop.
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