S
S
Stepan2020-05-29 18:52:29
Python
Stepan, 2020-05-29 18:52:29

How to set Russian language in npyscreen?

Only English works in npyscreen , and Russian is not even entered from the keyboard. How to set up Russian input? Or maybe there are similar libraries for TUI?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
AlexMal93, 2022-02-08
@Stepashka20

Also faced this problem.
Inside the library, you need to change the following modules:
1. wgtextbox.py
~420 replace the line with:

if (curses.ascii.isprint(inp) or ord('А')<= inp <=ord('я')) and \
        (chr(inp) not in '\n\t\r'):

Also comment out the following lines:
# "^K":           self.h_erase_right,
# "^U":           self.h_erase_left,

2. wgwidget.py
Comment out the line:
# "^P": self.h_exit_up,

S
szafranji, 2020-05-29
@szafranji

Why do you need npyscreen?
I wanted to write a console application, I tried npyscreen, but I was advised to use curses, since npyscreen is no longer supported.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question