Python 3.6.1 fails to generate 256 colors, with xterm-256color, on Cygwin based 64-bit Windows 10.
- Date: Sun, 11 Jun 2017 10:18:42 -0400
- From: "Richard S. Gordon" <rigordo@xxxxxxxxxxx>
- Subject: Python 3.6.1 fails to generate 256 colors, with xterm-256color, on Cygwin based 64-bit Windows 10.
1. Python 3.6.1 generates 8 colors (64-color pairs), with xterm, on Cygwin
based 32-bit Windows 10
2. Python 3.6.1 generates 16 colors (256-color pairs), with xterm-16color,
on Cygwin based 32-bit Windows 10
3. Python 3.6.1 generates 256 colors (65536-color pairs), with xterm-256color,
on Cygwin based 64-bit Windows 10. However, the generated colors appear to
be corrupted by overloading text attribute with specified foreground and
Fixing this Python 3.6.1 issue will probably require modification to the
Python curses stdlib. Here is the ncurses 6.0 author's description of the
notable changes that he made to ncurses 5.x in order to produce ncurses
6.0 (excerpted from: http://invisible-island.net/ncurses/announce.html):
a. Extend the cchar_t structure to allow more than 16 colors to be encoded.
b. Modify the encoding of mouse state to make room for a 5th mouse button.
That allows one to use ncurses with a wheel mouse with xterm or similar
X terminal emulators.
4. Cygwin problem reporter's test platform is a 27" iMAC (with 3.5 GHz Intel
Core i7, 16 GB 1600 MHz DDR3) running Mac OS 10.12.5 (Sierra). It includes
support for Python 3.6.0. It uses the Parallels Desktop 12 for Mac (a
hypervisor) to run the following guest operating system:
a. Android 4,
b. Linux (CentOS 7.2 & 7.3, Debian 8.7 & 8.8, Fedora 24 &25, OpenSUSE
13.2, Scientific 7.2 & 7.3, Ubuntu 16.04 & 17.04)
c. Solaris (OpenIndians Hipster 1610)
d. Unix (PCDBSD 10.3 & TrueOS 12.0)
e. Windows (10 32-bit, 10 64-bit) (NOTE: previously ran 32-bit XP, 7
and 8.1). Only Windows 10, with Cygwin, includes support for
Python 3.6.1 and support for xterm, xterm-16color and xterm-256olor.
The other Guest Operating Systems typically support Python 3.4.x or
Python 3.5.x with only xterm (8-color).
5. Cygwin problem reporter's suggest fixes:
a. The fix to the Python 3.6.1 curses stdlib should only be applied to
those 64-bit platform versions used with 64-bit ncurses 6.0.
b. The fix should NOT apply to the Python 3.6.1 curses stdlib applied
to those 32-bit platforms used with 32-bit ncurses 6.0, because the
32-bit ncurses 6.0 API is backwards compatible to the 32-bit ncurses
6. Cygwin Problem Reporter's Test Case:
This Cygwin problem can be demonstrated by running the Problem Reporter's
test_tsWxColorPalette.py in Python 3x (developer-sandbox) which can be
found in https://github.com/rigordo959/tsWxGTUI_PyVx_Repository.
Richard S. Gordon
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple