I have an linux based python application, which make use of pygtk and gtk.
It have both UI execution & command line mode execution option.
In UI mode, to create main application window, class definition is
class ToolWindow(common.Singleton, gtk.Window):
def __init__(self):
gtk.Window.__init__(self,gtk.WINDOW_TOPLEVEL)
What I want to do is, if application is able to import gtk and pygtk, then only
class ToolWindow should inherit both common.Singleton and gtk.Window classes, else it should only inherit common.Singleton class.
What is the best way to do it?