How can I get rid of seeing escape characters in Python3.12?

47 views Asked by At

When I'm in Python and use the arrow keys I see the escape characters: (e.g. ^[[A^[[B^[[C^[[A^[[D).

I want to just have the up arrow key go to last entry. So, my question is whether there's an alternative to gnureadline for Python 3.12.1?

I tried the following things:

  • Installing gnureadline (which fixes the issue for Python 3.11), but I get ERROR: Failed building wheel for gnureadline.
  • Installing readline (deprecated, but I thought try it out anyway), but I get ERROR: Failed building wheel for readline
  • Installed prompt_toolkit==3.0.43, which didn't solve the issue. Reasoning behind it is that it seems to work in IPython based on this thread.

Running:

  • Python 3.12.1
  • pip3 version 23.3.2 (python3.12.1)
  • Amazon Linux 2023 (aarch64)
0

There are 0 answers