In effect, we use setraw to make sure our raw character input goes straight into our process (without echoing or buffering or anything), and then reading and echoing the character-codes we see until 3 appears (which is CTRL-C, the common command for existing a REPL). Since we've turned on tty.setraw print doesn't reset the cursor to the left anymore, so we need to manually move left with \u001b[1000D after each print.
Publication date: 10 March 2026
。PDF资料是该领域的重要参考
10 monthly gift articles to share
Cons The app could be a little more intuitive