How can I get interactive Python to avoid using readline by allowing utf-8 input?

I use a terminal (9term), which edits the command line itself - programs that use readline just get in the way. He fully knows utf-8. How can I make an interactive python session disable readline while maintaining utf-8 input and output?

I am currently using:

LANG=en_GB.UTF-8 export LANG
cat | python -i

however, this leads to the fact that sys.stdin.encoding is not None, which implies Ascii (the default system encoding that does not seem volatile)

TERM=dumb python

doesn't disable readline (and it also controls utf-8 input).

I'm new to python, so apologize if this is an obvious question.

+3
source share
1 answer

readline Python, : configure --disable-readline

, .

+2

Source: https://habr.com/ru/post/1702370/


All Articles