[Twisted-Python] Resume FTP file retrieval

Andrew Bennetts andrew-twisted at puzzling.org
Sat Jan 3 11:17:40 EST 2004

On Sat, Jan 03, 2004 at 03:23:21PM -0000, Richard Townsend wrote:
> In the Python ftplib.FTP class's retrbinary() method you can pass a file
> offset using the 'rest' arg (in order to resume a partial download).
> Please could someone advise how to do a similar thing using the Twisted
> FTPClient class? 

There's currently no explicit support for this, but you could do:

    ftpclient.queueStringCommand("REST " + offset).addErrback(log.err)

before calling retrieveFile/retr.

(You probably want to do more than just log an error if the REST command
fails, but you get the idea...)


More information about the Twisted-Python mailing list