Answer the question
In order to leave comments, you need to log in
How to fix npyscreen error?
This is probably a stupid question, but I need help. Decided to try npyscreen the other day . I'm on Windows myself. npyscreen is dependent on curses and curses is not compatible with Windows, as I understand it. So I installed windows-curses . I wrote the simplest code according to the article on habr:
import npyscreen
class App(npyscreen.StandardApp):
""" Класс приложения npyscreen """
def onStart(self):
self.addForm('MAIN', ChatBoxForm, name='Chat Box')
class ChatBoxForm(npyscreen.ActionForm):
""" Форма виджета на котором будет написан заголовок """
def create(self):
self.title = self.add(npyscreen.TitleText, name='TitleText', value='Hello World')
def on_ok(self):
self.parentApp.setNextForm(None)
def on_cancel(self):
self.title.value = "Hello World!"
if __name__ == '__main__':
MyApp = App()
MyApp.run()
P.S. I've tried using different versions of Python. 7, 8, 9.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question