# Where does serial data get stored on a PC? [closed]

Say I have the following python script to read in serial data from my Arduino:

import serial

ser = serial.Serial("dev/ttyACM1", 9600)
ser.timeout = 2


On the other end I've flashed my Arduino with a program that sends 20 voltage readings every 0.5 seconds. The Arduino starts sending those readings from the moment it's hooked up, then after 20 seconds it stops and sends nothing.

Now what I've noticed is that I can read those 20 voltage values using the first script whenever I want. That is, I can hook up the Arduino, wait a couple of minutes then read in the values. This makes me think that the data is getting stored somewhere. I'm inclined to think that it's not being stored on the Arduino but on my laptop somewhere.

I've come up with a few questions that I hope the community could help me with:

1. Where is PySerial getting the data from?
2. For how long is the data stored in this place?
3. Is there a way to clear this space before reading in values?
4. How much storage space is there?
5. When you set the baud rate in PySerial (second line in script), is this the rate that PySerial reads data from the storage area (not the Arduino)?
6. I've noticed that if I set the baud rate in PySerial too high the first few lines of data are fragmented and sometimes completely wrong, why?
7. Not exactly related but when you set serial.Serial.timeout are the units in seconds?