How correct +[?25h at py prompt?

A beginner with Windows 10 Python.
How correct +[?25h at py prompt so it accepts commands?
Thank you

Can you post a screen shot of what you are seeing please?


I am not sure if you are seeing the screenshots.
After the ‘Type’ line, there are only Ascii codes.

These look like ANSI escape sequences. \x1b[?25h and \x1b[?25l show and hide the cursor, respectively. Your shell seems to be interpreting \x1b as ← for some reason, and then outputting the rest of the sequence as text.

Your shell is misconfigured. How or why, I don’t know.

1 Like

In code page 437, ← is encoded as \x1b. Most likely the character encoding of your terminal is configured to use this code page, or something similar.

This stackoverflow answer suggests a way to change the code page. I don’t use windows, so I can’t verify.

If you want to have those ANSI escape sequences working then you will need to use the Microsoft Terminal application. It is a free install from the Microsoft Store. Then you can use Terminal in place of the old CMD shell.

Hi Barry,

Terminal worked. Thank you.

I suspected those Ascii characters were expecting an Ascii terminal. I resisted the thought that Python’s Windows users would not have been alerted to this issue. Windows has Developer Mode, but activating it did not help.

I am a retired business programmer, 86, who started in 1960 on a Burroughs 205 using paper tape and machine language. More recently, IBM iSeries computers and desktops using Visual Studio and PXS.

My goal is to write a password manager app that uses local storage and does not ‘call home.’ The app would have Internet access but would be limited in initiating stored URLs.

Thank you again,

Walter

The term is ANSI not ASCII, these are the control sequences used by the DEC VT100 terminal and all modern terminal programs.