title: PySerial write() instant timeout
body: <p><strong>EDIT</strong></p>
  
  <p>I found out what the problem was and have answered my own question.</p>
  
  <p><strong>Original question below this line</strong></p>
  
  <p>I have a serial bridge between <code>COM4</code> and <code>COM5</code> implemented in software (Specifically, HDD's Free Virtual Serial Configuration Utility)</p>
  
  <p>I have two different python scripts starting up in two different instances of Powershell, receive first:</p>
  
  <pre><code>import serial
  receive = serial.Serial(port = 'COM5', baudrate = 9600)
  text = receive.read(100)
  receive.close()
  print text
  </code></pre>
  
  <p>And then the sender:</p>
  
  <pre><code>import serial
  send = serial.Serial(port = 'COM4', baudrate = 9600, timeout = 0)
  send.write("Hello")
  send.close()
  </code></pre>
  
  <p>When starting the sender script, the receiver script gets the sent message (So communication is clearly established) but the sender script immediately ends with an error:</p>
  
  <pre><code>Traceback (most recent call last):
    File ".\sending.py", line 3, in &lt;module&gt;
      send.writelines("Hello")
    File "C:\Python27\lib\site-packages\serial\serialwin32.py", line 270, in write
      raise writeTimeoutError
  serial.serialutil.SerialTimeoutException: Write timeout
  </code></pre>
  
  <p>I get the same error when I change the sender script to</p>
  
  <pre><code>send = serial.Serial(port = 'COM4', baudrate = 9600)
  </code></pre>
  
  <p>So my question is: What exactly is timing out? How do I prevent that from happening? I mean, the data IS being sent so I could probably just put the whole thing in a <code>try/except(and do nothing)</code> block but that seems like a bad solution in the long run.</p>