Created
October 19, 2015 22:21
-
-
Save studiawan/779596d3629f64a8e6ee to your computer and use it in GitHub Desktop.
Using ftplib to print current working directory
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
from ftplib import FTP | |
f = FTP('localhost') | |
print "Welcome:", f.getwelcome() | |
f.login('hudan') | |
print "Current working directory:", f.pwd() | |
names = f.nlst() | |
print 'List of directory: ', names | |
f.quit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment