Name

retrbinary

Synopsis

                        f.retrbinary(command,callback,blocksize=8192,rest=None)

Retrieves data in binary mode. command is a string with an appropriate FTP command, typically 'RETR filename‘. callback is a callable that retrbinary calls for each block of data returned, passing the block of data, a string, as the only argument. blocksize is the maximum size of each block of data. When rest is not None, it’s the offset in bytes from the start of the file at which you want to start the retrieval, if the FTP server supports the 'REST' command. When rest is not None and the FTP server does not support the 'REST' command, retrbinary raises an exception.

Get Python in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.