[issue30609] Python 3.6.1 fails to generate 256 colors on Cygwin based 64-bit Windows 10

2017-06-18 Thread Richard S. Gordon

Richard S. Gordon added the comment:

FYI: Here is an update to my subsequent bug report to the Cygwin project team. 
You might find my answers to their questions useful in the future.

> Begin forwarded message:
> 
> From: "Richard S. Gordon" >
> Subject: Re: Python 3.6.1 fails to generate 256 colors, with xterm-256color, 
> on Cygwin based 64-bit Windows 10.
> Date: June 12, 2017 at 3:21:22 AM EDT
> To: cyg...@cygwin.com 
> Cc: rigo...@comcast.net , 
> brian.ing...@systematicsw.ab.ca 
> Reply-To: "Richard S. Gordon"  >
> 
> Hello Cygwin & Brian Inglis,
> 
> 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. I
> used   a   different  mailer  to  generate  plain  text,  without  pdf
> attachment.
> 
> My HTML formatted email was rejected.
> 
> Re: Python 3.6.1 fails to generate 256 colors, with xterm-256color, on Cygwin 
> based 64-bit Windows 10.
> 
> From: Brian Inglis 
> 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-e3262988b...@comcast.net 
> >
> Reply-to: Brian dot Inglis at SystematicSw dot ab dot ca
> *** IMPORTANT ***
> Each test application is a small part of a software repository which contains:
> 
> Development Sandboxes (not requiring installation and registration with a 
> specific Python 2x or Python3x release).
> Site Packages (requiring installation and registration with a specific Python 
> 2x or Python3x release).
> My toolkit uses the Python curses API to interrogate the built-in features. 
> It overrides the built-in curses color palette only if curses allows the 
> change.
> 
> In order to verify or troubleshoot my Python 3.6.1 failure, it is necessary 
> to clone a copy of my toolkit repository on to your computer from its GitHub 
> repository.
> The errors you got when you tried to run one of my failing test applications 
> are the result of trying to run it without its associated built-in toolkit 
> libraries.
> 
> You can place the repository copy into any convenient location on your 
> system. If you work within one of its Developer Sandboxes, instead of 
> installing
> any of its Site Packages, you will be able to delete the entire repository 
> rather than those components which were installed and registered with 
> individual
> Python 2x or Python 3x releases.
> 
> Each Developer Sandbox automatically finds and uses its associated libraries.
> On 2017-06-11 08:18, Richard S. Gordon wrote:
> See how to make decent Cygwin problem reports at the link below my sig.
> 
>> 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 background colors.
> Could you please give some examples of what you expect to see and why,
> and what you actually see?

> NOTES:
> On left is 32-bit Python 3.6.1 which supports only 16 colors (per limitation 
> of 32-bit processor)
> On right is 64-bit Python 3.6.1 which supports 140 colors (per emulation of 
> 68 WxPython + 72 extra); besides wrong colors, notice the spurious underlines.
> Sample 32-bit and 64-bit Python 3.6.1.pdf
> 
> Which Windows console are you running the test in: mintty, cmd, …?
> Cygwin’s MINTTY, typically configured for 80 columns x 43-50 rows.
> 
> What are the results when you run it in another console?
> None available
> 
> Are you running a Windows Insider or some developer build?
> No
> That recently had a keyboard problem that was fixed a few days later.
> 
>> 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 
>> 
> Could you please provide a direct link to a Simple Test Case program,
> again with examples of what you expect to see and what you actually see?
> I had to dig to find where you hid your test program.
> See Important Notes at beginning of my reply.
> 
> If the program requires certain Cygwin python modules installed to run,
> please state which Cygwin packages need to be installed.
> The console, ncursesw, pty, or tty person trying to reproduce and
> diagnose your problem may not be a python guy.
> My Toolkit and its Test Applications use only Python 3.6.1 and its associated 
> standard 

[issue30609] Python 3.6.1 fails to generate 256 colors on Cygwin based 64-bit Windows 10

2017-06-12 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy:  -haypo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30609] Python 3.6.1 fails to generate 256 colors on Cygwin based 64-bit Windows 10

2017-06-11 Thread Richard S. Gordon

Richard S. Gordon added the comment:

> On Jun 9, 2017, at 4:57 PM, Masayuki Yamamoto  wrote:
> 
> 
> Masayuki Yamamoto added the comment:
> 
> @rigordo Are you using mintty? If I remember rightly, mintty hasn't been set 
> 256 colors after installation (at least in past release, I'm not sure 
> currently).
> 

Yes, I am using the Cygwin mintty console (typically configured for 80 columns 
by 50 rows). On Linux, MacOS X, Solaris. Unix and Windows (with cygwin) 
platforms, I issue the appropriate console bash commands to change 
(TERM=emulator) or reset (STTY sane) the terminal emulation:

TERM=xterm
TERM=xterm-16color
TERM=xterm-88color
TERM=xterm-256color

> --
> 
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30609] Python 3.6.1 fails to generate 256 colors on Cygwin based 64-bit Windows 10

2017-06-11 Thread Richard S. Gordon

Richard S. Gordon added the comment:

> On Jun 9, 2017, at 5:41 PM, Terry J. Reedy  wrote:
> 
> 
> Terry J. Reedy added the comment:
> 
> Richard, when replying by email, please strip quoted text except for an 
> occasional line or two.  (See example of limited in-context quote below.)
> 
> A bug, for the purpose of this tracker, is a discrepancy between between the 
> docs written by the PSF's core development team and the code provided by the 
> same.  The PSF curses module is documented as unix-only.  In particular, 
> "This extension module is designed to match the API of ncurses, an 
> open-source curses library hosted on Linux and the BSD variants of Unix."  It 
> does not run on the PSF (python.org) Windows distribution, because there is 
> no C interface to a Windows implementation of curses.
> 

Cygwin is a Linux-like (Unix-compatible) command line interface and run-time 
environment plug-in for Windows. My cross-platform Python code does not use a 
PSF Windows implementation. It only uses the standard Python 2x and Python 3x 
curses library module low level API to emulate a subset of the wxPython 
high-level API. It has been run successfully with xterm (8-color) and 
xterm-16color terminal emulators (including the ones provided with all Cygwin 
releases since 2007). All platforms manifest the same failure when my software 
attempts to use the xterm-256color terminal emulator:

PC-BSD 10.3 Unix
TrueOS (PC-BSD) 12.0 Unix
MacOS X 7.0-10.12.5 (Darwin & BSD Unix based)
Oracle OpenSolaris 11
OpenIndiana Hipster-1610 Solaris 1
CentOS Linux 7.2 & 7.3
Debian Linux 8.7.0 & 8.8.0
Fedora Linux 24 & 25
Scientific Linux 7.2 & 7.3
Windows  XP, 7, 8.1 and 10 (each with Cygwin plug-in)

I am reporting this issue to PSF because I suspect that the standard Python 
3.6.1 curses libraries has not be updated to support more that 16 colors on 
64-bit platforms. None of my non-Windows 64-bit platforms currently incorporate 
ncurses 6.0 or Python 3.6.1. I’m anxiously waiting for new releases to those 
non-windows operating systems.

 import curses  # 64-bit 3.6.1 on Win 10 using python.org installer
> Traceback (most recent call last):
>  File "", line 1, in 
>import curses
>  File "C:\Programs\Python36\lib\curses\__init__.py", line 13, in 
>from _curses import *
> ModuleNotFoundError: No module named '_curses'
> 
> Anything Cygwin does to improve on this is their responsibility.
> 
>> how do you explain my success in running my wxPython emulation on all Cygwin 
>> releases since 2007
> 
> One or more people on the wxPython and/or Cygwin and/or other teams exerted 
> the effort to make this happen.

wxPython is a pixel-mode GUI. It does use the character-mode curses or ncurses 
libraries.

Cygwin provides both X11 pixel-mode graphics and ncurses-based character-mode 
graphics.
> 
> --
> nosy: +terry.reedy
> resolution:  -> third party
> stage: test needed -> resolved
> status: open -> closed
> 
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30609] Python 3.6.1 fails to generate 256 colors on Cygwin based 64-bit Windows 10

2017-06-11 Thread Richard S. Gordon

Richard S. Gordon added the comment:

Clarification:
The suggested fix to the Python 3.6.1 curses stdlib should only be applied to 
those 64-bit platform version used with 64-bit ncurses 6.0.
It 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 5.x API.

> On Jun 11, 2017, at 6:39 AM, Richard S. Gordon  > wrote:
> 
> 
> Richard S. Gordon added the comment:
> 
>> On Jun 10, 2017, at 4:28 AM, Richard S. Gordon > > wrote:
>> 
>> 
>>> On Jun 9, 2017, at 4:59 PM, Richard S. Gordon >>  >> >> wrote:
>>> 
>>> 
>>> Richard S. Gordon added the comment:
>>> 
 On Jun 9, 2017, at 4:41 PM, STINNER Victor  >> wrote:
 
 
 STINNER Victor added the comment:
 
 Cygwin is not currently supported by CPython, so I suggest to close this
 issue. I mean: please report the issue to Cygwin, not CPython.
 
 --
 
 ___
 Python tracker  
 >>
  
 >>
 ___
>>> 
>>> Before you close this issue, answer how do you explain my success in 
>>> running my wxPython emulation on all Cygwin releases since 2007 (Python 
>>> 2.6.8) to 2017 (2.7.13 and Python 3.0-3.5.2 and 3.6.0-3.6.2)?
>>> 
>>> Richard S. Gordon
>>> 
>>> --
>>> 
>>> ___
>>> Python tracker  
>>> >>
>>>  
>>> >>
>>> ___
>> 
>> FYI:
>> 
>> My current 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:
>> Android 4,
>> 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)
>> Solaris (OpenIndians Hipster 1610)
>> Unix (PCDBSD 10.3 & TrueOS 12.0)
>> 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 3.4.x or 3.5.x with xterm (8-color).
>> 
>> Richard S. Gordon
> 
> Fixing this Python 3.6.1 issue will probably require modification to the 
> Python curse 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 
> ):
> Extend the cchar_t structure to allow more than 16 colors to be encoded.
> 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.
> Richard S. Gordon
> 
> --
> 
> ___
> Python tracker >
> >
> ___

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30609] Python 3.6.1 fails to generate 256 colors on Cygwin based 64-bit Windows 10

2017-06-11 Thread Richard S. Gordon

Richard S. Gordon added the comment:

> On Jun 10, 2017, at 4:28 AM, Richard S. Gordon  wrote:
> 
> 
>> On Jun 9, 2017, at 4:59 PM, Richard S. Gordon > > wrote:
>> 
>> 
>> Richard S. Gordon added the comment:
>> 
>>> On Jun 9, 2017, at 4:41 PM, STINNER Victor >> > wrote:
>>> 
>>> 
>>> STINNER Victor added the comment:
>>> 
>>> Cygwin is not currently supported by CPython, so I suggest to close this
>>> issue. I mean: please report the issue to Cygwin, not CPython.
>>> 
>>> --
>>> 
>>> ___
>>> Python tracker >
>>> >
>>> ___
>> 
>> Before you close this issue, answer how do you explain my success in running 
>> my wxPython emulation on all Cygwin releases since 2007 (Python 2.6.8) to 
>> 2017 (2.7.13 and Python 3.0-3.5.2 and 3.6.0-3.6.2)?
>> 
>> Richard S. Gordon
>> 
>> --
>> 
>> ___
>> Python tracker >
>> >
>> ___
> 
> FYI:
> 
> My current 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:
> Android 4,
> 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)
> Solaris (OpenIndians Hipster 1610)
> Unix (PCDBSD 10.3 & TrueOS 12.0)
> 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 3.4.x or 3.5.x with xterm (8-color).
> 
> Richard S. Gordon

Fixing this Python 3.6.1 issue will probably require modification to the Python 
curse 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):
Extend the cchar_t structure to allow more than 16 colors to be encoded.
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.
Richard S. Gordon

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30609] Python 3.6.1 fails to generate 256 colors on Cygwin based 64-bit Windows 10

2017-06-10 Thread Richard S. Gordon

Richard S. Gordon added the comment:

> On Jun 9, 2017, at 4:59 PM, Richard S. Gordon  wrote:
> 
> 
> Richard S. Gordon added the comment:
> 
>> On Jun 9, 2017, at 4:41 PM, STINNER Victor  wrote:
>> 
>> 
>> STINNER Victor added the comment:
>> 
>> Cygwin is not currently supported by CPython, so I suggest to close this
>> issue. I mean: please report the issue to Cygwin, not CPython.
>> 
>> --
>> 
>> ___
>> Python tracker 
>> 
>> ___
> 
> Before you close this issue, answer how do you explain my success in running 
> my wxPython emulation on all Cygwin releases since 2007 (Python 2.6.8) to 
> 2017 (2.7.13 and Python 3.0-3.5.2 and 3.6.0-3.6.2)?
> 
> Richard S. Gordon
> 
> --
> 
> ___
> Python tracker 
> 
> ___

FYI:

My current 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:
Android 4,
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)
Solaris (OpenIndians Hipster 1610)
Unix (PCDBSD 10.3 & TrueOS 12.0)
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 3.4.x or 3.5.x with xterm (8-color).

Richard S. Gordon

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30609] Python 3.6.1 fails to generate 256 colors on Cygwin based 64-bit Windows 10

2017-06-09 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Richard, when replying by email, please strip quoted text except for an 
occasional line or two.  (See example of limited in-context quote below.)

A bug, for the purpose of this tracker, is a discrepancy between between the 
docs written by the PSF's core development team and the code provided by the 
same.  The PSF curses module is documented as unix-only.  In particular, "This 
extension module is designed to match the API of ncurses, an open-source curses 
library hosted on Linux and the BSD variants of Unix."  It does not run on the 
PSF (python.org) Windows distribution, because there is no C interface to a 
Windows implementation of curses.

>>> import curses  # 64-bit 3.6.1 on Win 10 using python.org installer
Traceback (most recent call last):
  File "", line 1, in 
import curses
  File "C:\Programs\Python36\lib\curses\__init__.py", line 13, in 
from _curses import *
ModuleNotFoundError: No module named '_curses'

Anything Cygwin does to improve on this is their responsibility.

> how do you explain my success in running my wxPython emulation on all Cygwin 
> releases since 2007

One or more people on the wxPython and/or Cygwin and/or other teams exerted the 
effort to make this happen.

--
nosy: +terry.reedy
resolution:  -> third party
stage: test needed -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30609] Python 3.6.1 fails to generate 256 colors on Cygwin based 64-bit Windows 10

2017-06-09 Thread Richard S. Gordon

Richard S. Gordon added the comment:

> On Jun 9, 2017, at 4:41 PM, STINNER Victor  wrote:
> 
> 
> STINNER Victor added the comment:
> 
> Cygwin is not currently supported by CPython, so I suggest to close this
> issue. I mean: please report the issue to Cygwin, not CPython.
> 
> --
> 
> ___
> Python tracker 
> 
> ___

Before you close this issue, answer how do you explain my success in running my 
wxPython emulation on all Cygwin releases since 2007 (Python 2.6.8) to 2017 
(2.7.13 and Python 3.0-3.5.2 and 3.6.0-3.6.2)?

Richard S. Gordon

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30609] Python 3.6.1 fails to generate 256 colors on Cygwin based 64-bit Windows 10

2017-06-09 Thread Masayuki Yamamoto

Masayuki Yamamoto added the comment:

@rigordo Are you using mintty? If I remember rightly, mintty hasn't been set 
256 colors after installation (at least in past release, I'm not sure 
currently).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30609] Python 3.6.1 fails to generate 256 colors on Cygwin based 64-bit Windows 10

2017-06-09 Thread STINNER Victor

STINNER Victor added the comment:

Cygwin is not currently supported by CPython, so I suggest to close this
issue. I mean: please report the issue to Cygwin, not CPython.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30609] Python 3.6.1 fails to generate 256 colors on Cygwin based 64-bit Windows 10

2017-06-09 Thread Richard S. Gordon

Richard S. Gordon added the comment:

> On Jun 9, 2017, at 12:32 PM, STINNER Victor  > wrote:
> 
> 
> STINNER Victor added the comment:
> 
> What is your operating system? How did you install ncurses? What is your 
> ncurses version?
> 
> On Linux, Python is linked dynamically to the system ncurses library. Python 
> is built using system ncurses headers.
> 
> --
> 
> ___
> Python tracker >
> >
> ___

Host operating system is Windows 10 (updated to 1703)
ncurses and Python 3.6.1 were included in cygwin.

Cygwin log:

2017/03/26 02:34:07 Starting cygwin install, version 2.877
2017/03/26 02:34:07 User has backup/restore rights
2017/03/26 02:34:07 Current Directory: d:\Cygwin64
2017/03/26 02:34:07 Could not open service McShield for query, start and stop. 
McAfee may not be installed, or we don't have access.
2017/03/26 02:34:17 Ending cygwin install

$ uname -a
CYGWIN_NT-10.0 WIN10PRO64VM 2.8.0(0.309/5/3) 2017-04-01 20:47 x86_64 Cygwin

excerpt from curses.h header file from cygwin’s /user/include/curses.h:

/
 * Copyright (c) 1998-2016,2017 Free Software Foundation, Inc.  *
 *  *
 * Permission is hereby granted, free of charge, to any person obtaining a  *
 * copy of this software and associated documentation files (the*
 * "Software"), to deal in the Software without restriction, including  *
 * without limitation the rights to use, copy, modify, merge, publish,  *
 * distribute, distribute with modifications, sublicense, and/or sell   *
 * copies of the Software, and to permit persons to whom the Software is*
 * furnished to do so, subject to the following conditions: *
 *  *
 * The above copyright notice and this permission notice shall be included  *
 * in all copies or substantial portions of the Software.   *
 *  *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF   *
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
 * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR*
 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR*
 * THE USE OR OTHER DEALINGS IN THE SOFTWARE.   *
 *  *
 * Except as contained in this notice, the name(s) of the above copyright   *
 * holders shall not be used in advertising or otherwise to promote the *
 * sale, use or other dealings in this Software without prior written   *
 * authorization.   *
 /

/
 *  Author: Zeyd M. Ben-Halim > 1992,1995   *
 * and: Eric S. Raymond > *
 * and: Thomas E. Dickey1996-on *
 /

/* $Id: curses.h.in,v 1.248 2017/03/09 09:43:50 tom Exp $ */

#ifndef __NCURSES_H
#define __NCURSES_H

#define CURSES 1
#define CURSES_H 1

/* These are defined only in curses.h, and are used for conditional compiles */
#define NCURSES_VERSION_MAJOR 6
#define NCURSES_VERSION_MINOR 0
#define NCURSES_VERSION_PATCH 20170325

/* This is defined in more than one ncurses header, for identification */
#undef  NCURSES_VERSION
#define NCURSES_VERSION "6.0"

/*
 * Identify the mouse encoding version.
 */
#define NCURSES_MOUSE_VERSION 2

/*
 * Definitions to facilitate DLL's.
 */
#include 

#if 1
#include 
#endif

/*
 * User-definable tweak to disable the include of .
 */
#ifndef NCURSES_ENABLE_STDBOOL_H
#define NCURSES_ENABLE_STDBOOL_H 1
#endif

/*
 * NCURSES_ATTR_T is used to quiet compiler warnings when building ncurses
 * configured using --disable-macros.
 */
#ifndef NCURSES_ATTR_T
#define NCURSES_ATTR_T int
#endif

/*
 * Expands to 'const' if ncurses is configured using --enable-const.  Note that
 * doing so makes it incompatible with other implementations of X/Open Curses.
 */
#undef  NCURSES_CONST
#define NCURSES_CONST /*nothing*/


[issue30609] Python 3.6.1 fails to generate 256 colors on Cygwin based 64-bit Windows 10

2017-06-09 Thread STINNER Victor

STINNER Victor added the comment:

What is your operating system? How did you install ncurses? What is your 
ncurses version?

On Linux, Python is linked dynamically to the system ncurses library. Python is 
built using system ncurses headers.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30609] Python 3.6.1 fails to generate 256 colors on Cygwin based 64-bit Windows 10

2017-06-09 Thread Richard S. Gordon

Richard S. Gordon added the comment:

> On Jun 9, 2017, at 11:59 AM, Richard S. Gordon  wrote:
> 
> 
>> On Jun 9, 2017, at 11:16 AM, STINNER Victor  wrote:
>> 
>> 
>> STINNER Victor added the comment:
>> 
>>> Generated colors appear to be corrupted by overloading text attribute with 
>>> specified foreground and background colors.
>> 
>> Python doesn't contain anything in its stdlib to control the color of the 
>> terminal. Are you sure that you posted your bug report at the right place?
>> 
>> --
>> nosy: +haypo
>> 
>> ___
>> Python tracker 
>> 
>> ___
> 
> My application, emulates the high level wxPython API, using the standard 
> Python curses package. It uses such curses API methods as window.attron(text 
> attribute) and window.attroff(text attribute). Now that ncurses 6.0 has been 
> released, it supports 64-bit processors and 256+colors. Python 3.6.1 should 
> have been updated to support the new ncurses 64-bit API. It does not seem to 
> have been updated. With the ncurses5.x 32-bit API, the Python 2x and 3x 
> curses modules supported up to 16 colors and up to 64 color pairs. The 
> updated curses packages should support at least 256 colors and at least 65536 
> color pairs.
> 
> Richard S. Gordon

I neglected to state that ncurses 6.0 changed certain c/c++ data types to 
support the additional data bits needed to support more colors. The Python 
curses stdlib needs to reflect the new c/c++ ncurses data types.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30609] Python 3.6.1 fails to generate 256 colors on Cygwin based 64-bit Windows 10

2017-06-09 Thread Richard S. Gordon

Richard S. Gordon added the comment:

> On Jun 9, 2017, at 11:16 AM, STINNER Victor  wrote:
> 
> 
> STINNER Victor added the comment:
> 
>> Generated colors appear to be corrupted by overloading text attribute with 
>> specified foreground and background colors.
> 
> Python doesn't contain anything in its stdlib to control the color of the 
> terminal. Are you sure that you posted your bug report at the right place?
> 
> --
> nosy: +haypo
> 
> ___
> Python tracker 
> 
> ___

My application, emulates the high level wxPython API, using the standard Python 
curses package. It uses such curses API methods as window.attron(text 
attribute) and window.attroff(text attribute). Now that ncurses 6.0 has been 
released, it supports 64-bit processors and 256+colors. Python 3.6.1 should 
have been updated to support the new ncurses 64-bit API. It does not seem to 
have been updated. With the ncurses5.x 32-bit API, the Python 2x and 3x curses 
modules supported up to 16 colors and up to 64 color pairs. The updated curses 
packages should support at least 256 colors and at least 65536 color pairs.

Richard S. Gordon

--
nosy: +rigordo959

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30609] Python 3.6.1 fails to generate 256 colors on Cygwin based 64-bit Windows 10

2017-06-09 Thread STINNER Victor

STINNER Victor added the comment:

> Generated colors appear to be corrupted by overloading text attribute with 
> specified foreground and background colors.

Python doesn't contain anything in its stdlib to control the color of the 
terminal. Are you sure that you posted your bug report at the right place?

--
nosy: +haypo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30609] Python 3.6.1 fails to generate 256 colors on Cygwin based 64-bit Windows 10

2017-06-09 Thread Zachary Ware

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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30609] Python 3.6.1 fails to generate 256 colors on Cygwin based 64-bit Windows 10

2017-06-09 Thread Richard S. Gordon

New submission from Richard S. Gordon:

Generated colors appear to be corrupted by overloading text attribute with 
specified foreground and background colors.

This can be demonstrated by running test_tsWxColorPalette.py in Python 3x 
(developer-sandbox) found in 
https://github.com/rigordo959/tsWxGTUI_PyVx_Repository. 

Richard S. Gordon

--
messages: 295495
nosy: rigordo
priority: normal
severity: normal
status: open
title: Python 3.6.1 fails to generate 256 colors on Cygwin based 64-bit Windows 
10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com