File dir() example : Ftp : Network PYTHON TUTORIALS


PYTHON TUTORIALS » Network » Ftp »

 

File dir() example


from ftplib import FTP

f = FTP('ftp.kernel.org')
f.login()

f.cwd('/pub/linux/kernel')
entries = []
f.dir(entries.append)

print "%d entries:" % len(entries)
for entry in entries:
    print entry
f.quit()



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Network
» Ftp