sample_box.py
gr=0
class SampBoxLayout(BoxLayout):
def input_rpm(self, instance, value):
if value is True:
global gr
gr=22
pyth.py
from sample_box import gr
while(True):
if(gr== '22'):
sample_box.py
gr=0
class SampBoxLayout(BoxLayout):
def input_rpm(self, instance, value):
if value is True:
global gr
gr=22
pyth.py
from sample_box import gr
while(True):
if(gr== '22'):
Try creating a constant instead of a normal variable:
GR = 0
and then import it:
import sample_box
To get the constant, use the syntax:
sample_box.GR
Add this to your code to prevent the import statement to run sample_box.py:
GR = 0
if __name__ == "__main__":
# all your code that you don't want to run here