ftplib question - ftp.dir() returns something and ftp.nlst() does not

Fredrik Lundh fredrik at pythonware.com
Thu Nov 24 15:09:08 CET 2005


Nico Grubert wrote:

> I am using the ftplib library to connect to a ftp server.
> After I got connected, I can see a list of file in the current directory
> using ftp.dir() or ftp.retrlines('LIST'). But using ftp.nlst() returns
> an empty list which seems somehow strange to me. Here is, what I did:

add

    ftp.set_debuglevel(3)

so you can see what the goes on the wire (without that information, it's hard
to tell if it's a bug in the library or a glitch in your server).

</F> 






More information about the Python-list mailing list