THRIFT-1480. py: remove tabs, adjust whitespace and address PEP8 warnings

This patch addresses a host of PEP8 lint problems.

Patch: Will Pierce

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1226890 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/py/src/transport/TTwisted.py b/lib/py/src/transport/TTwisted.py
index b6dcb4e..3ce3eb2 100644
--- a/lib/py/src/transport/TTwisted.py
+++ b/lib/py/src/transport/TTwisted.py
@@ -16,6 +16,9 @@
 # specific language governing permissions and limitations
 # under the License.
 #
+
+from cStringIO import StringIO
+
 from zope.interface import implements, Interface, Attribute
 from twisted.internet.protocol import Protocol, ServerFactory, ClientFactory, \
     connectionDone
@@ -25,7 +28,6 @@
 from twisted.web import server, resource, http
 
 from thrift.transport import TTransport
-from cStringIO import StringIO
 
 
 class TMessageSenderTransport(TTransport.TTransportBase):
@@ -79,7 +81,7 @@
         self.started.callback(self.client)
 
     def connectionLost(self, reason=connectionDone):
-        for k,v in self.client._reqs.iteritems():
+        for k, v in self.client._reqs.iteritems():
             tex = TTransport.TTransportException(
                 type=TTransport.TTransportException.END_OF_FILE,
                 message='Connection closed')