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

Wrapper Function Does Not Work in Python 3.12

Open sanssecours opened this issue 2 years ago • 2 comments

Description

It looks like using the function wrapper fails, if we use Python 3.12 (to execute the code below).

Steps to Reproduce

  1. Store the following code:

    from curses import wrapper
    from time import sleep
    
    
    def user_interface(stdscr):
        stdscr.addstr("Hello")
        stdscr.refresh()
        while True:
            sleep(0.1)
            pass
    
    
    def main():
        wrapper(user_interface)
    
    
    if __name__ == "__main__":
        main()
    

    in a file called example.py

  2. Execute the file in a terminal window:

    python example.py
    

Expected Result

The terminal window should something like this:

Wrapper

Actual Result

The script exits with an error ($? is set to False):

Failed

System Information

  • Python: Python 3.12
  • OS: Windows 10
  • Windows Curses: Version 2.3.2

sanssecours avatar Nov 16 '23 17:11 sanssecours

#50 is the same issue.

irvinren avatar Nov 27 '23 01:11 irvinren

#50 is the same issue. setupterm failed.

irvinren avatar Nov 27 '23 01:11 irvinren