title: Python: read and send via serial interface from Notebook to Notebook
body: <p>Hi guys I would like to receive and send data via a USB interface.
  My idea is simple: I have two Notebooks wired by using USB. On the first notebook1, the software: &quot;serial monitor&quot;  is running for reading the data protocol. I would like to send messages with my Python program(notebook2).</p>
  <p>The next step i would like to recive messages from the notebook1. The reciving massages should be saved in text file by python</p>
  <p>Example :</p>
  <pre><code>   (Python Program)notebook2 ----------------USB cable--------------------notebook1 (Serial Monitor for read/send) 
  
  should send a message (ABC)                                               should recive the message (ABC)
  
  after that the next step:
  
  should read message (CBA)                                                 should send message (CBA)
  print(_recived_message_)
  </code></pre>
  <hr />
  <hr />
  <p>Code here i got:</p>
  <pre><code>import serial.tools.list_ports as port_list
  import serial
  import time
  
  ports = list(port_list.comports())
  for p in ports:
      print (p)
  
      s = serial.Serial('COM6')
      res = s.read()
      print(res)
  
  serialString = &quot;&quot;
  while 1:
  
      if serialPort.in_waiting &gt; 0:
          serialString = serialPort.readline()
  
          try:
              print(serialString.decode(&quot;Ascii&quot;))
          except:
              pass
  </code></pre>
  <p>Output:</p>
  <pre><code>C:\Users\user\anaconda3\envs\ReadUSB\python.exe C:/Users/user/PycharmProjects/ReadUSB/main.py
  COM6 - Prolific USB-to-Serial Comm Port (COM6)
  </code></pre>
  <p>i hope you guys can help me out</p>