title: python tcp/ip socket datastream gets interupted
body: <p>I use a tcp/ip to rs232 converter from expert EX-9132 where i connect to a datalogger to receive data, after sending a request (chr27 via tcp) for requesting data, the transmission is interupted before receiving all the available data. I like to finish the transmission after all data has been received. The below code is the python code.</p>
  
  <p>Does anyone have an idea how to extend the receive time?</p>
  
  <pre><code>import socket
  s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  HOST = '192.168.1.5'
  PORT = 4660
  s.connect((HOST, PORT))
  s.send( b'\x1b' ) #this is "chr27" to sent to the device
  
  data = ""
  data += s.recv(200)
  f = open('/home/fspr/minicom/201104cc-tcp.txt', 'a')
  data1 = data.replace("/t", ";")
  f.write(data1)
  f.close()
  print data.replace("/t", ";")
  s.close()
  </code></pre>