windows-curses icon indicating copy to clipboard operation
windows-curses copied to clipboard

python3.9: missing set_escdelay + set_tabsize

Open asottile opened this issue 3 years ago • 1 comments

These are new APIs that I added in python3.9, they are currently missing:

https://github.com/python/cpython/pull/16938

currently this is breaking my text editor babi on windows with a trace that looks like this:

(venv39) C:\Users\Anthony\workspace\babi>babi
Traceback (most recent call last):
  File "c:\users\anthony\workspace\babi\babi\screen.py", line 620, in make_stdscr
    yield _init_screen()
  File "c:\users\anthony\workspace\babi\babi\screen.py", line 597, in _init_screen
    curses.set_escdelay(25)
AttributeError: module 'curses' has no attribute 'set_escdelay'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Anthony\workspace\babi\venv39\Scripts\babi-script.py", line 33, in <module>
    sys.exit(load_entry_point('babi', 'console_scripts', 'babi')())
  File "c:\users\anthony\workspace\babi\babi\main.py", line 147, in main
    with perf_log(args.perf_log) as perf, make_stdscr() as stdscr:
  File "C:\python39\lib\contextlib.py", line 117, in __enter__
    return next(self.gen)
  File "c:\users\anthony\workspace\babi\babi\screen.py", line 622, in make_stdscr
    curses.endwin()
_curses.error: must call initscr() first

asottile avatar Nov 07 '20 19:11 asottile

The missing set_escdelay() also breaks https://github.com/flengyel/RYLR998-LoRa under Windows. I'm running Python 3.11.5.

flengyel avatar Sep 11 '23 16:09 flengyel