title: Python serial port returing null string
body: <p>Reading data from the serial port:
  readline() in the below code return the null vector, the reading data from the serial port is hexadecimal number like AABB00EF the putty gives me the output means the communication is working but nothing works via python
  here is the code:</p>
  
  <pre><code>#!/usr/bin/python
  
  import serial, time
  
  ser = serial.Serial()
  ser.port = "/dev/ttyUSB0"
  ser.baudrate = 115200
  #ser.bytesize = serial.EIGHTBITS 
  #ser.parity = serial.PARITY_NONE 
  #ser.stopbits = serial.STOPBITS_ONE
  #ser.timeout = None         
  ser.timeout = 1              
  #ser.xonxoff = False    
  #ser.rtscts = False    
  #ser.dsrdtr = False       
  #ser.writeTimeout = 2    
  try: 
      ser.open()
  except Exception, e:
      print "error open serial port: " + str(e)
      exit()
  
  if ser.isOpen():
  
      try:
          #ser.flushInput() 
          #ser.flushOutput()
          #time.sleep(0.5)  
         # numOfLines = 0
  
         # f=open('signature.txt','w+')
  
          while True:
            response = ser.readline()
            print len(response)
            #f=ser.write(response)
            print response
           # numOfLines = numOfLines + 1
  
  
          f.close()
          ser.close()
      except Exception, e1:
          print "error communicating...: " + str(e1)
  
  else:
      print "cannot open serial port "
  </code></pre>