windows-curses
                                
                                
                                
                                    windows-curses copied to clipboard
                            
                            
                            
                        color_content() fails above color 15 and pair_number() result needs shifting to use
I have found two issues with the current release of windows-curses:
- The color_content() function fails for any color number above 15, while in an *ix ncurses environment it returns values (although they are not correct values in my testing so far).
 - The pair_number() function on Windows only returns a value that must be shifted right by 16 bits before it can be used as the argument to the pair_content() function. In an *ix ncurses environment the shift is not required.
 
For issue 2, if the shift is not done then the program crashes with these error messages at the call to pair_content().
Traceback (most recent call last):
File "C:\test\wincurses-issues.py", line 60, in 
Code to show the two problems is attached as a *.txt file. Rename to *.py to run the example. Comment out the test for windows and the pair shift to observe the crash.
Environments tested: Win 10-64 Python 3.8.9 (tags/v3.8.9:a743f81, Apr 6 2021, 14:02:34) [MSC v.1928 64 bit (AMD64)] windows-curses 2.2.0
Ubuntu 20.04 (Win 10 / WSL2) libncurses6/focal,now 6.2-0ubuntu2 amd64
Peter