The latest Windows 10 updates include support for ANSI escape sequences in conhost.exe.
I have been able to confirm that the escape sequences are properly picked up in cmd.exe, so I have the necessary updates. In particular, I tried typing in prompt $e[?25l
, which hides the cursor, and then prompt $e[?25h
, which again shows the cursor.
However, if I start a Python interpreter, and then do the following:
>>> import sys
>>> sys.stdout.write("33[?25l")
Well, the cursor isn't hidden. How can I set things up the right way so that the console is able to get escape sequences from Python?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…