summaryrefslogtreecommitdiffhomepage
path: root/demos
diff options
context:
space:
mode:
authorRobey Pointer <robey@lag.net>2007-02-13 11:21:09 -0800
committerRobey Pointer <robey@lag.net>2007-02-13 11:21:09 -0800
commit87d97fa2091d42b1764cc482a03e1e2005798a45 (patch)
treef87f04aced4f8c1e58813b71c528879b289feae4 /demos
parent83b335e10f1129e54e5fa5f8c72acb5407c21219 (diff)
[project @ robey@lag.net-20070213192109-axy7gl61x7w0cpbp]
add get/put to the sftp demo
Diffstat (limited to 'demos')
-rwxr-xr-xdemos/demo_sftp.py4
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()