get list of files
eels
eels at nikocity.de
Tue Feb 7 07:00:14 EST 2006
Hello Fredrik,
thank's for your quick help.
Greetings Eels
Fredrik Lundh schrieb:
> "eels" wrote:
>
> > I want to get a listing of my files at web server with ftp. I wantn 't
> > download the files.
> > With yyy = ftp.retrlines('LIST') I get this listing at stdout, but I
> > need this information at variable yyy.
> > How can I resolve this problem?
>
> as mentioned in the documentation, you need to provide a callback if
> you want to collect the data from a retr operation.
>
> yyy = []
> ftp.retrlines("LIST", yyy.append)
>
> should do the trick.
>
> (also see the dir and nlst methods)
>
> </F>
More information about the Python-list
mailing list