def cb_button_winecfg(self, button): self.main_window.hide() while Gtk.events_pending(): Gtk.main_iteration() command = '$WINELOADER winecfg' os.system(command) self.main_window.show()