def create_color(foreground, background, attrs=0):
"""Create a new color pair."""
try:
create_color.index += 1
except:
create_color.index = 1
curses.init_pair(create_color.index, foreground, background)
return curses.color_pair(create_color.index) | attrs
# Character attributes
评论列表
文章目录