PyCharm debugger console ANSI escape sequences

南笙酒味 提交于 2021-01-28 12:00:02

问题


PyChar 3.4.1 debugger console appears to support some ANSI escape sequences but not all. Is there a way to find out what is or isn't supported? I noticed that setting a text color like red '\033[31m' works but not the reset/normal/endc '\033[0m' code. I could set it to black but then I can't see the text on my black terminal window when I run the program from bash.

Also, I noted that stdin under the debugger returns False for

sys.stdin.isatty()

回答1:


You can find the code used by PyCharm for parsing ANSI escape sequences here. (You can also send pull requests to add support for sequences which aren't supported by the current code.)



来源:https://stackoverflow.com/questions/31502144/pycharm-debugger-console-ansi-escape-sequences

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