I need a function similar to gobject.io_add_watch , but for a variable. For example, you need to check the stop variable, initialized to stop = False , and when stopped, to True it should call the function. I cannot have a separate thread watching a variable in a loop with time.sleep.
Is there such a function or a way to do this?
variables python watch
Nolhian
source share