I have converted some Python code to use PYGI but I can't figure out how to convert this line:
gtk.timeout_add(PING_FREQUENCY * 1000, self.doWork)
To by clear, since I don't really know the difference between PYGTK and PYGI, my new code uses
from gi.repository import Gtk
from gi.repository import AppIndicator3 as appindicator
as shown here https://wiki.ubuntu.com/DesktopExperienceTeam/ApplicationIndicators#Python_version
The full code I am trying to convert is here http://pastebin.com/raw.php?i=aUtASRpy
What is the equivalent of
gtk.timeout_add(PING_FREQUENCY * 1000, self.doWork)
in PYGI?
I am also assuming PYGI is the most modern way to make a unity indicator
I also assuming that it is best for the indicator to check the state of something rather than for something to tell the indicator the state (push vs pull). Is it okay to have a python program checking something every second?
Thanks!