May-24-2019, 12:39 PM
Hi,
Very new to Python and trying to figure out how I can get the value from a variable in one script into another.
I have a python script called "Accelerator" which gets a constantly changing value from a UDP packet and then prints that value to the screen
-> print("Revs = " + str(int(revsPC)))
What I want to do is grab that value in revsPC pass it to another script and display it
I have tried the import i.e import Accelerator but this I understand executes the whole Accelerator script which throws up an error. I have also tried import revsPC from Accelerator but that doesn't seem to do anything.
Am I missing something really obvious? I am very new to python so my ignorance is high!
Thanks in advance for any help.
Very new to Python and trying to figure out how I can get the value from a variable in one script into another.
I have a python script called "Accelerator" which gets a constantly changing value from a UDP packet and then prints that value to the screen
-> print("Revs = " + str(int(revsPC)))
What I want to do is grab that value in revsPC pass it to another script and display it
I have tried the import i.e import Accelerator but this I understand executes the whole Accelerator script which throws up an error. I have also tried import revsPC from Accelerator but that doesn't seem to do anything.
Am I missing something really obvious? I am very new to python so my ignorance is high!
Thanks in advance for any help.