How do I print colored text in IDLE's terminal?

后端 未结 6 1631
谎友^
谎友^ 2020-12-11 19:50

This is very easily a duplicate question--because it is. However, there are very many inadequate answers to this (e.g. try curses! -- pointing to a 26 page docu

6条回答
  •  一向
    一向 (楼主)
    2020-12-11 20:10

    You can use clrprint module to print color text in idle, Terminal and Powershell too.

    Install:

    pip install clrpirnt

    Usage:

    from clrprint import *
    clrhelp() # to see colors available
    user_input = clrinput('INPUT MESSAGE',clr='green') # just like input()
    clrprint('YOURTEXT',user_input,clr='color')   # just like print()
    

提交回复
热议问题