[Checkins] SVN: Zelenium/trunk/scripts/tinyWeb Normalize Python source.

Tres Seaver tseaver at palladion.com
Thu May 18 08:54:35 EDT 2006


Log message for revision 68173:
  Normalize Python source.

Changed:
  U   Zelenium/trunk/scripts/tinyWebClient.py
  U   Zelenium/trunk/scripts/tinyWebServer.py

-=-
Modified: Zelenium/trunk/scripts/tinyWebClient.py
===================================================================
--- Zelenium/trunk/scripts/tinyWebClient.py	2006-05-17 16:23:10 UTC (rev 68172)
+++ Zelenium/trunk/scripts/tinyWebClient.py	2006-05-18 12:54:33 UTC (rev 68173)
@@ -2,16 +2,15 @@
 import httplib
 
 if ( len(sys.argv) != 5 ):
-	print "usage tinyWebClient.py [host] [port] [method] [path]"
-else:	
-	host = sys.argv[1]
-	port = sys.argv[2]
-	method = sys.argv[3]
-	path = sys.argv[4]
+    print "usage tinyWebClient.py host port method path"
+else:
+    host = sys.argv[1]
+    port = sys.argv[2]
+    method = sys.argv[3]
+    path = sys.argv[4]
 
-	info = (host, port)
-	print("%s:%s" % info)
-	conn = httplib.HTTPConnection("%s:%s" % info)
-	conn.request(method, path)
-	print(conn.getresponse().msg)
-
+    info = (host, port)
+    print "%s:%s" % info
+    conn = httplib.HTTPConnection("%s:%s" % info)
+    conn.request(method, path)
+    print conn.getresponse().msg

Modified: Zelenium/trunk/scripts/tinyWebServer.py
===================================================================
--- Zelenium/trunk/scripts/tinyWebServer.py	2006-05-17 16:23:10 UTC (rev 68172)
+++ Zelenium/trunk/scripts/tinyWebServer.py	2006-05-18 12:54:33 UTC (rev 68173)
@@ -27,7 +27,8 @@
 
 class HTTPHandler(CGIHTTPServer.CGIHTTPRequestHandler):
     """
-    Simple Web Server that can handle query strings in a request URL and can be stopped with a request
+    Simple Web Server that can handle query strings in a request URL and
+    can be stopped with a request
     
     """
     
@@ -54,19 +55,20 @@
         HTTPHandler.quitRequestReceived = True 
 
 if __name__ == '__main__':
-	port = PORT
-	if len(sys.argv) > 1:
-	    port = int(sys.argv[1])
-	
-        server_address = ('', port)
-    	httpd = BaseHTTPServer.HTTPServer(server_address, HTTPHandler)
-    
-    	print "serving at port", port
-    	print "To run the entire JsUnit test suite, open"
-    	print "  http://localhost:8000/jsunit/testRunner.html?testPage=http://localhost:8000/tests/JsUnitSuite.html&autoRun=true"
-    	print "To run the acceptance test suite, open"
-    	print "  http://localhost:8000/TestRunner.html"
-    
-    	while not HTTPHandler.quitRequestReceived :
-        	httpd.handle_request()	
-	
+    port = PORT
+    if len(sys.argv) > 1:
+        port = int(sys.argv[1])
+
+    server_address = ('', port)
+    httpd = BaseHTTPServer.HTTPServer(server_address, HTTPHandler)
+
+    print "serving at port", port
+    print "To run the entire JsUnit test suite, open"
+    print ("  http://localhost:8000/jsunit/testRunner.html?testPage="
+           "http://localhost:8000/tests/JsUnitSuite.html&autoRun=true")
+    print "To run the acceptance test suite, open"
+    print "  http://localhost:8000/TestRunner.html"
+
+    while not HTTPHandler.quitRequestReceived :
+        httpd.handle_request()
+



More information about the Checkins mailing list