I creating applet in gnome panel. All code is good. But info in panel is static. But need refresh this info in time. 1 secon or 5 second...
Here is part of python code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import gobject
import gtk
import pygtk
import gnomeapplet
import time
import urllib2
pygtk.require('2.0')
def applet_factory(applet, iid):
label = gtk.Label("Simple text")
applet.add(label)
applet.show_all()
print('Factory started')
if __name__ == '__main__': # testing for execution
print('Starting factory')
gnomeapplet.bonobo_factory('OAFIID:SampleApplet_Factory',
gnomeapplet.Applet.__gtype__,
'Sample Applet', '0.1',
applet_factory)
I need refresh "simple text" label in time interval. How did that?