title: PySerial App runs in shell, by not py script
body: <p>I have a very simple python script that uses pySerial to send data over the serial port to my Arduino.  When I execute this line-by-line in the python shell, it works just fine, but when I put it in a ".py" file, and try to run it, nothing happens.  Though the serial lights on my UART do flash.  So something is getting through, but it's garbage (I checked).</p>
  
  <p>Here is the simple code.</p>
  
  <pre><code>import serial
  
  ser = serial.Serial('COM3',9600,timeout=.2)
  ser.write('A')
  ser.close()
  </code></pre>
  
  <p>I've already tried adding sleeps, but nothing seems to be fixing it.  Any ideas?</p>