[Checkins] SVN: zc.buildoutsftp/branches/dev/get.py Manual test
script.
Jim Fulton
jim at zope.com
Thu Sep 14 07:08:25 EDT 2006
Log message for revision 70168:
Manual test script.
Changed:
A zc.buildoutsftp/branches/dev/get.py
-=-
Added: zc.buildoutsftp/branches/dev/get.py
===================================================================
--- zc.buildoutsftp/branches/dev/get.py 2006-09-14 09:03:59 UTC (rev 70167)
+++ zc.buildoutsftp/branches/dev/get.py 2006-09-14 11:08:24 UTC (rev 70168)
@@ -0,0 +1,39 @@
+##############################################################################
+#
+# Copyright (c) 2006 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Get a URL using urllib2. Intended for manual testing of the sftp support
+
+This script provides for crude manual testing of the sftp support
+until I figure out how to do automated tests.
+
+Usage: bin/py get.py url
+
+You can give multiple urls.
+
+$Id$
+"""
+
+import sys, urllib2, zc.buildoutsftp.buildoutsftp
+
+zc.buildoutsftp.buildoutsftp.install(None)
+
+for url in sys.argv[1:]:
+ print '=' * 70
+ print url
+ print '=' * 70
+ f = urllib2.urlopen(url)
+ print f.url
+ print f.info
+ print
+ print f.read()
+
Property changes on: zc.buildoutsftp/branches/dev/get.py
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
More information about the Checkins
mailing list