retrbinary ! how does it work ? - Python
bytes.com › topic › pythonsession.retrbinary ('RETR '+file, open (file, 'wb').write) (hmm, using file as a variable name is not a good idea, it hides the builtin type of the same name) It does work but the files are copied in the same directory as the python file. And I would like to copy the file in this relative directory : ../archives
ftp.retrbinary() help python - Stack Overflow
https://stackoverflow.com/questions/469641314.01.2011 · ftp.retrbinary('RETR %s' % filename, lambda data: f.write(data)) I suppose you could even do this, passing the write instance method of the file directly as your callback: ftp.retrbinary('RETR %s' % filename, f.write) All three of these examples should be analogous and hopefully tracing through them will help you to understand what's going on.