Implementing a backspace in Python 3.3.2 Shell using Idle

旧城冷巷雨未停 提交于 2019-11-28 02:22:00

Edit:

Apparently the carriage return \r and the backspace \b won't actually work within Idle because it uses a text control that doesn't render return/backspace properly.

You might be able to write some sort of patch for Idle, but it might be more trouble than it's worth (unless you really like Idle)

This doesn't answer your question in a literal fashion, but I think it might be useful to point out that generally interfaces like the one where you are describing (e.g., where one part of the screen is continuously updated, without newlines), it just generally implemented using a library like ncurses.

Python has a curses library built-in (http://docs.python.org/3.3/library/curses.html), which can more or less achieve your end goal.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!