FTP : get dir name with space caracters embedded + is ther something quicker than LIST

Andrew Markebo andrew.markebo at telia.com
Thu Apr 3 12:31:07 CEST 2003

Regarding question 1, speed.. are you sure it is python and not the
ftp-server that takes time to send you the filenames?

What speed do you get if you use the nlst command instead (can be
found on the ftp object)

| LIST is slow but it works. One other problem is the directory name in
| which there is spaces : like
| "data file today".
|  I can do a :
| elements= line.split(" "), 
| but the data before my directory name has not the same format : for
| example :
| .....
| may 22   2001     name of directory
| mar 15    02:00   other directory name
| .....

Implementation error ;-) Maybe should try line.split(" ", 3), telling
it only to split the 3 first spaces, the rest should probably stick
together.. Or do a regexp that can handle the driectory output.. 


 The eye of the beholder rests on the beauty!

More information about the Python-list mailing list