I have 2 daemons, which should access the same Variable. I've created a 3rd file for global variables and each daemon can access the variable. But when one changes the variable the other one still sees the default value.
example:
glob.py
time = 0
daemon a:
import datetime
import time
import glob
while(True):
glob.time = datetime.datetime.now()
time.sleep(30)
daemon b:
import glob
while(True):
print(glob.time)
it would print 0 everytime I hope I've made my problem clear, and someone can help me. If you need some more information please feel free to ask.
See Question&Answers more detail:os