How do I make an exit button in npyscreen?
问题 What I want is basically a regular npyscreen.Form, but I want the "OK" button to say "Exit". It appears that you can't change the name of the button in the regular npyscreen.Form, so I tried subclassing npyscreen.ButtonPress: import npyscreen class ExitButton(npyscreen.ButtonPress): def whenPressed(self): self.parentApp.setNextForm(None) class MainForm(npyscreen.FormBaseNew): def create(self): self.exitButton = self.add(ExitButton, name="Exit", relx=-12, rely=-3) class App(npyscreen