It is hard to describe but I will try my best. What i want is similar to this scenario. in main.py file:
var = None
while true:
var += 1
time.sleep(1)
in my anotherpythonfile.py
I want to access the var, but in every 5 second or whenever i want and check the current value. is there any design pattern for it?or any method?
Aucun commentaire:
Enregistrer un commentaire