[Tutor] sftp get single file

Matt Herzog msh at blisses.org
Mon Jul 20 23:16:59 CEST 2009


If I change

remotepath = 'datestr'

to 

remotepath = datestr

I get:

sftp.get(remotepath, localpath)
  File "build/bdist.linux-x86_64/egg/paramiko/sftp_client.py", line 587, in get
  IOError: [Errno 21] Is a directory: '/tmp/testor/'


So remotepath is really more like a path + filname.

So I need to do something like os.join the two?


-- 
I fear you speak upon the rack,
Where men enforced do speak anything.

- William Shakespeare


More information about the Tutor mailing list