Il Mon, 17 Aug 2009 10:43:33 -0700 (PDT), seldan24 ha scritto: > Hello, > > I'm utterly confused by something which is most likely trivial. I'm > attempting to connect to an FTP server, retrieve a list of files, and > store than in an array. I.e.: > > import ftplib > > ftp = ftplib.FTP(server) > ftp.login(user, pass) > ftp.cwd(conf['testdir'])
Why bother with retrlines? Use the provided higer level fuctions: remotefiles = [] ftp.dir(remotefiles.append) or, if you prefer nlst remotefiles = ftp.nlst() regards david -- http://mail.python.org/mailman/listinfo/python-list