Oct 27 2008

reload program after logoff in python/pygtk

Tag: gtk,pygtk,pythonerm @ 6:28 pm

This snippit of code will restart/reload your python/pygtk app when you log out so you don’t have to keep restarting it.

import gnome.ui
gnome.program_init('program name', "1.0")
client = gnome.ui.master_client()
command = os.path.normpath(os.path.join(os.getcwd(), sys.argv[0]))
client.set_restart_style(gnome.ui.RESTART_IF_RUNNING)
try: client.set_restart_command([command] + sys.argv[1:])
except TypeError:
	client.set_restart_command(len(sys.argv), [command] + sys.argv[1:])
client.connect('die', gtk.main_quit)

Oct 22 2008

TreeView and the frustration

Tag: gtk,pygtk,pythonerm @ 3:47 pm

Anyone that’s ever used treeview, might understand my frustration.

I really don’t understand the reasoning behind forcing people to use cellrenders.

Continue reading “TreeView and the frustration”