rigordo959 / tsWxGTUI_PyVx_Repository

The TeamSTARS "tsWxGTUI_PyVx" Toolkit is designed to be a foundation for developing, operating and troubleshooting those Python Curses based application programs embedded in local and remote 32-/64-bit computer systems used to monitor and control mission critical equipment.
13 stars 1 forks source link

Python 3.6.1 curses stdlib (32-bit ncurses 5x-based) fails to create user specified color palette on 64-bit platforms. #67

Open rigordo959 opened 7 years ago

rigordo959 commented 7 years ago

Python 3.6.1 curses stdlib (32-bit ncurses 5x-based should have been 64-bit ncurses 6.0 based) fails to create user specified color palette on 64-bit platforms because the curses stdlib appears to still be using the old ncurses 5.x 32-bit data types which only support 16 colors rather than the ncurses 6.0 64-bit data types. Available platforms with ncurses 6.0 and Python 3.6.1 are: (1) 64-bit Windows 10 and (2) 64-bit TrueOS (PCBSD) 12.0

The following modification to Toolkit's Python 2x and Python 3x tsWxGlobals.py modules were made to enable the Toolkit to support more than 256-color pairs (16 colors):

Correct "tsEnableColorPairLimit" method by replacing: "if (sys.maxsize <= 232):" by "if (sys.maxsize < 231):" because: for 64-bit processor: 264 = 18446744073709551616 263 = 9223372036854775808 sys.maxsize = 9223372036854775807

                   for 32-bit processor:
                             2**32 = 4294967296
                             2**31 = 2147483648
                       sys.maxsize = 2147483647
rigordo959 commented 7 years ago

Developers of host operating system, Cygwin, ncurses, pdcurses and Python interpreter/run-time libraries have yet to use the tsWxGTUI_PyVx Toolkit to exercise or test their work products:

         * The Python Software Foundation closed my problem report shortly
           after I submitted it:

           Zachary Ware <report@bugs.python.org>,
           Zachary Ware added the comment:

           This is going to need a significantly reduced reproducer
           that doesn't rely on anything outside the standard library
           before we can do anything with it, especially since Cygwin
           support is currently tenuous at best.  erik.bray or masamoto
           may have more insight, though.

           ----------
           nosy: +erik.bray, masamoto, zach.ware
           stage:  -> test needed
           type:  -> behavior
           versions: +Python 3.6

           _______________________________________
           Python tracker <report@bugs.python.org>
           <http://bugs.python.org/issue30609>
           _______________________________________

         * Red Hat's Cygwin organization has only asked a few questions
           after I submitted my problem report:

           cygwin@cygwin.com,Brian.Inglis@SystematicSw.ab.ca

           I have not yet received the subject e-mail but did see a
           copy in the Cygwin Archive. I've reproduced it below to
           facilitate my reply.

            Re: Python 3.6.1 fails to generate 256 colors, with
                xterm-256color, on Cygwin based 64-bit Windows 10.

            From: Brian Inglis <Brian dot Inglis at
                  SystematicSw dot ab dot ca>

            To: cygwin at cygwin dot com
            Date: Sun, 11 Jun 2017 09:44:09 -0600
            Subject: Re: Python 3.6.1 fails to generate 256 colors,
                     with xterm-256color, on Cygwin based 64-bit
                     Windows 10.
            Authentication-results: sourceware.org; auth=none
            References: <86DAFF59-6EA8-4288-9D7D-E3262988BD7C@comcast.net>
            Reply-to: Brian dot Inglis at SystematicSw dot ab dot ca