I have a Python program named read.py
which reads data from serial communication every second, and another python program called calculate.py
which has to take the real time values from read.py
.
Using subprocess.popen('read.py',shell=True)
I am able to run read.py
from calculate.py
May I know how to read or use the value from read.py
in calculate.py
?
Since the value changes every second I am confused how to proceed like, saving value in registers or producer consumer type, etc.
for example : from import datetime
when ever strftime %s
is used, the second value is given
how to use the same technique to use variable from another script?