March 2003
Intermediate to advanced
656 pages
39h 30m
English
retrbinary
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.
Read now
Unlock full access