I'm new to python/programming, so maybe I have been searching the wrong syntax for this question.
I'm working on some python scripts. For example, in one of the python scripts I am grabbing sensor data such as time, altitude, and pressure, let's call this getsensor.py
Then, I have another script that needs the data from "getsensor.py", let's call this "buildstring.py"
So, I wanted to have a simple overall python script, that would call "getsensor.py" and then call "buildstring.py"
I thought the way to do this would be to issue a "from getsensor import time, altitude, pressure" at the beginning of "buildstring.py" but this seems to not be what I am expecting...any advice or tips to point me in the correct direction? Trying to keep it pretty simple.
Edit: Seems as though by issuing an "import X" it is running that script. So when I do this, my X script contains some code which causes my scripts to just run in an indefinite loop. The only programming I've really done is assembly, so I'm not sure how to save data that can be shared among multiple python scripts