[paramiko] scp not sftp

James Bardin jbardin at bu.edu
Wed May 23 10:50:53 PDT 2007


> By the way, you should be able to change this line:
>
>      chan.sendall("%s" % ( f.read()))
>
> to this:
>
>      chan.sendall(f.read())
>
>   

of course you may also want to add some sort of buffer, maybe something 
like:

s = f.read(32768)
while s:
    chan.sendall(s)
    s = f.read(32768)

Robey,
    Would you have an idea why I can get full 100Mb/s transfers with 
scp, but only 50-70% of that with sftp?  What kind of extra work is sftp 
doing?

Thanks
-jim




More information about the paramiko mailing list