[cig-commits] r15712 - doc/geodynamics.org/benchmarks/trunk

luis at geodynamics.org luis at geodynamics.org
Wed Sep 30 15:06:30 PDT 2009


Author: luis
Date: 2009-09-30 15:06:29 -0700 (Wed, 30 Sep 2009)
New Revision: 15712

Added:
   doc/geodynamics.org/benchmarks/trunk/upload.py
Log:
Uploading a single file

Added: doc/geodynamics.org/benchmarks/trunk/upload.py
===================================================================
--- doc/geodynamics.org/benchmarks/trunk/upload.py	                        (rev 0)
+++ doc/geodynamics.org/benchmarks/trunk/upload.py	2009-09-30 22:06:29 UTC (rev 15712)
@@ -0,0 +1,26 @@
+#!/usr/bin/env python
+#
+# http://pexpect.sourceforge.net/pexpect.html
+# http://linux.byexamples.com/archives/346/python-how-to-access-ssh-with-pexpect/
+# http://www.palovick.com/code/python/python-ssh-client.php
+#
+import pexpect
+from zopelogin import user, password
+
+file = "index.html"
+root = "http://geodynamics.org/cig/software/benchmarks/test"
+url  = root + "/index_html"
+
+title = "setting title with nd"
+zopens = "http://www.zope.org/propsets/default"
+
+def login(p):
+    p.expect('Username for "Zope":*')
+    p.sendline(user)
+    p.expect('Password:*')
+    p.sendline(password)
+
+print("Uploading to " + url)
+p = pexpect.spawn("nd -p '%s' '%s'" % (file, url))
+login(p)
+


Property changes on: doc/geodynamics.org/benchmarks/trunk/upload.py
___________________________________________________________________
Name: svn:executable
   + *



More information about the CIG-COMMITS mailing list