How to read ASCII data from a serial port into a file in Python
<p>I need to read ASCII data including LF and CR from an external device using the serial port of the PC and write it to a file using Python.</p>

<p>I just started learning Python but I was able to open up a port but now I'm having trouble with the actual reading part because I'm not sure how to specify when data is finished and so the file can be written, can someone please help with some code examples?</p>

<p>The settings for the port are:</p>

<pre><code>Serial = 'COM3', baudrate=9600, bytesize=8, parity='N', stopbits=1
</code></pre>
