Open ahaoboy opened 11 months ago
win11 + Windows terminal
import curses curses.setupterm() # error: python ./tmp.py' terminated by signal SIGSEGV (Address boundary error) # print(curses.initscr()) # print(curses.termname()) def get_tparm(key): val = None key = curses.tigetstr(key) if key: val = curses.tparm(key) if val: val = val.decode("utf-8") return val # expect: ('\x1b(B\x1b[m', '\x1b[1m', '\x1b[4m') # actual: (None, None, None) print((get_tparm("sgr0"), get_tparm("bold"), get_tparm("smul")))
win11 + Windows terminal