ftplib.FTP.retrlines

FTP.retrlines(cmd, callback=None)[source]

Retrieve data in line mode. A new port is created for you.

Args:

cmd: A RETR, LIST, NLST, or MLSD command. callback: An optional single parameter callable that is called

for each line with the trailing CRLF stripped. [default: print_line()]
Returns:
The response code.