I have a python program that periodically does some jobs according to that value of a given global variable "a". How can another python program change the value of "a" to (let's say) 20?
a = 10
def run_program():
global a
while True:
time.sleep(1)
print(a)
I tried with OS signals, but a signal (e.g. USR1) can't pass variables
Any helps?