I am writing a module that uses FTPLib to extract files. I want to find a way to pass a value (in addition to a block) to a callback. Essentially my callback
def handleDownload(block, fileToWrite): fileToWrite.write(block)
And I need to call
ftp.retrbinary('RETR somefile', handleDownload)
And let it pass the file descriptor. Is there any way to do this?
source share