I'm working on a simple indicator in Ubuntu with python and I want the menuitem to display the return of a function and refresh every "n" second.
Here is what I have:
def build_menu():
menu = gtk.Menu()
item_internetstatus = gtk.MenuItem("Internet : " + internetstatus())
menu.append(item_internetstatus)
The function is internetstatus() and my objective is to run internetstatus() every n seconds so that the menuitem label is also updated.
Thank you.