[Tutor] File transfer HTTP -> SFTP
modulok at gmail.com
Tue Mar 1 21:46:50 CET 2011
This isn't a python solution, but if you have an ssh connection to
both servers, (I assume so) you can forward them directly. It would
look like this in an operating system shell like tcsh or bash:
me at baz> scp -r me at foo.com:/home/me/pictures me at bar.com:/somewhere/
You could wrap the above command with python via the subprocess module
On 3/1/11, Emanuel Lauria <emanuel.lauria at gmail.com> wrote:
> Sorry if im annoying, but I think this is a better question than my previous
> one of today.
> I have some Images in an HTTP Server that I need to transfer to an SFTP
> server using a Python script.
> So far I can download them to my hard drive, and upload them to the sftp
> server; quite easy. I would like to do the transfer without touching my hard
> How could I do that?
> Im using paramiko, but STPClient.put() reads from the filesystem.
> put(self, localpath, remotepath, callback=None)
> Copy a local file (localpath) to the SFTP server as remotepath.
More information about the Tutor