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