title: Python - pySerials inWaiting() always return 0
body: <p>I'm trying to make a small program that receives messages from the serial port, and doing it periodically. Right now I'm not saving anything, I'm just trying to see if I get anything at all, so I tried this code:</p>
  
  <pre><code>def ReceiveRS():
     global ser
     while ser.inWaiting() &gt; 0:
        print(ser.read(1))
  </code></pre>
  
  <p>ser is the serial port, which is correctly initialized, as it has worked before and I can send stuff. After trying some different things I have found out that inWaiting() never seems to return anything but 0. Anyone have any ideas as to why and how to fix it?</p>
  
  <p>Oh, and I'm using Python 3.2.3, with pySerial on a Raspberry PI. </p>