def action(self, close, *args): ############ modify for inheritence ############# #do the action here #close window if close: self.closeWindow() pass