From 87d97fa2091d42b1764cc482a03e1e2005798a45 Mon Sep 17 00:00:00 2001 From: Robey Pointer Date: Tue, 13 Feb 2007 11:21:09 -0800 Subject: [project @ robey@lag.net-20070213192109-axy7gl61x7w0cpbp] add get/put to the sftp demo --- demos/demo_sftp.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'demos') 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() -- cgit v1.2.3