Why not "list = ftplib.FTP.dir()" ?
trylks
trylks at gmail.com
Mon Feb 7 17:26:07 EST 2011
More information about the Python-list mailing list
Mon Feb 7 17:26:07 EST 2011
- Previous message (by thread): Universal Feed Browser problem in feedparser.py
- Next message (by thread): Why not "list = ftplib.FTP.dir()" ?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I don't know if it is ftplib or just me, but something feels terribly wrong in this: from ftplib import FTP > from functools import partial > > class MyFTP(FTP): > def dir(self): > l = [] > super(MyFTP, self).dir(partial(lambda l, e: l.append(e.split()), l)) > return l > Unfortunately 'MLSD' is not available in the server I have to use. (I need to get the list of folders and files modified since last access, hence split). Cheers. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-list/attachments/20110207/71faf945/attachment.html>
- Previous message (by thread): Universal Feed Browser problem in feedparser.py
- Next message (by thread): Why not "list = ftplib.FTP.dir()" ?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list