[Tutor] sftp get single file

Sander Sweers sander.sweers at gmail.com
Mon Jul 20 22:22:37 CEST 2009


I do not know paramiko but looking over the client documentations...

2009/7/20 Matt Herzog <msh at blisses.org>:
> if __name__ == "__main__":
>    t = paramiko.Transport((hostname, port))
>    t.connect(username=username, password=password)
>    sftp = paramiko.SFTPClient.from_transport(t)

Up to here it looks fine.

>    sftp(remotepath,localpath)

If I understand it correctly you need to use sftp.get(remotepath, localpath).

Greets
Sander


More information about the Tutor mailing list