How to print colored text in Python?

前端 未结 30 2855
谎友^
谎友^ 2020-11-21 04:41

How can I output colored text to the terminal in Python?

30条回答
  •  梦谈多话
    2020-11-21 05:21

    You can use the Python implementation of the curses library: http://docs.python.org/library/curses.html

    Also, run this and you'll find your box:

    for i in range(255):
        print i, chr(i)
    

提交回复
热议问题