diff options
author | Robey Pointer <robey@lag.net> | 2007-02-13 11:21:09 -0800 |
---|---|---|
committer | Robey Pointer <robey@lag.net> | 2007-02-13 11:21:09 -0800 |
commit | 87d97fa2091d42b1764cc482a03e1e2005798a45 (patch) | |
tree | f87f04aced4f8c1e58813b71c528879b289feae4 /demos | |
parent | 83b335e10f1129e54e5fa5f8c72acb5407c21219 (diff) | |
download | paramiko-87d97fa2091d42b1764cc482a03e1e2005798a45.tar.gz |
[project @ robey@lag.net-20070213192109-axy7gl61x7w0cpbp]
add get/put to the sftp demo
Diffstat (limited to 'demos')
-rwxr-xr-x | demos/demo_sftp.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/demos/demo_sftp.py b/demos/demo_sftp.py index 0706f363..b79bc503 100755 --- a/demos/demo_sftp.py +++ b/demos/demo_sftp.py @@ -101,6 +101,10 @@ try: data = sftp.open('demo_sftp_folder/README', 'r').read() open('README_demo_sftp', 'w').write(data) print 'copied README back here' + + # BETTER: use the get() and put() methods + sftp.put('demo_sftp.py', 'demo_sftp_folder/demo_sftp.py') + sftp.get('demo_sftp_folder/README', 'README_demo_sftp') t.close() |