def stop(self):
        super(UITask, self).stop()
        if self.app is not None:
            self.app.switchForm(None)
npycurses magic to shutdown the app.
dataset/ETHPy150Open facebook/sparts/sparts/tasks/tui.py/UITask.stop