An scp1 implementation, compatible with openssh scp. Raises
SCPException for all transport related errors. Local filesystem and OS
errors pass through.
Main public methods are .put and .get The get method is controlled by
the remote scp instance, and behaves accordingly. This means that
symlinks are resolved, and the transfer is halted after too many levels
of symlinks are detected. The put method uses os.walk for recursion, and
sends files accordingly. Since scp doesn't support symlinks, we send file
symlinks as the file (matching scp behaviour), but we make no attempt at
symlinked directories.
|
__init__(self,
transport,
buff_size=16384,
socket_timeout=5.0,
progress=None)
Create an scp1 client. |
source code
|
|
|
put(self,
files,
remote_path=' . ' ,
recursive=False,
preserve_times=False)
Transfer files to remote host. |
source code
|
|
|
get(self,
remote_path,
local_path='
' ,
recursive=False,
preserve_times=False)
Transfer files from remote host to localhost |
source code
|
|
|
_read_stats(self,
name)
return just the file stats needed for scp |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|