Some Thrift documentation cleanups

Summary: Getting ready to hand this over to powerset, just want to have the right licenses in place and such first.

Reviewed By: thrift


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665029 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/test/py/TestClient.py b/test/py/TestClient.py
index 3e48733..07066e3 100755
--- a/test/py/TestClient.py
+++ b/test/py/TestClient.py
@@ -1,14 +1,16 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 import sys
 sys.path.append('./gen-py')
 
-import ThriftTest
-from ThriftTest_types import *
+from ThriftTest import ThriftTest
+from ThriftTest.ttypes import *
 from thrift.transport import TTransport
 from thrift.transport import TSocket
 from thrift.protocol import TBinaryProtocol
 
+import time
+
 import hotshot
 from hotshot import stats
 prof = None
@@ -17,8 +19,6 @@
 #prof = hotshot.Profile('hotshot_thrift_stats')
 #prof.start()
 
-import timing
-
 host = 'localhost'
 port = 9090
 framed = False
@@ -55,11 +55,15 @@
 transport.open()
 
 # Start debug timing
-timing.start()
+tstart = time.time()
 
-print "testVoid()"
-print client.testVoid()
-
+try:
+  print "testVoid()"
+  print client.testVoid()
+except TApplicationException, x:
+  print x.message
+  print x.type
+  
 print "testString('Python')"
 print client.testString('Python')
 
@@ -97,8 +101,9 @@
 except Xception, x:
   print "Xception (%d, %s)" % (x.errorCode, x.message)
 
-timing.finish()
-print "Total time: %d microsecs" % timing.micro()
+tend = time.time()
+ttotal = (tend-tstart)*1000
+print "Total time: %f ms" % (ttotal)
 
 # Close!
 transport.close()