How to use terminal color palette with curses

后端 未结 6 1892
名媛妹妹
名媛妹妹 2021-01-30 13:45

I can\'t get the terminal color palette to work with curses.

import curses

def main(stdscr):
    curses.use_default_colors()
    for i in range(0,7):
        st         


        
6条回答
  •  渐次进展
    2021-01-30 14:36

    You can use the culour package by installing with:

    pip install culour
    

    And then you can use it to print with color to curses:

    culour.addstr(window, "colored string")
    

提交回复
热议问题