[Python-Dev] _cursesmodule linking, and portability

Thomas Wouters thomas@xs4all.net
Sun, 23 Jul 2000 15:16:12 +0200

On Sun, Jul 23, 2000 at 03:21:31PM +0300, Moshe Zadka wrote:
> On Sun, 23 Jul 2000, Eric S. Raymond wrote:

> > So I recommend trying to add has_key to the curses module interface in
> > Python, conditionalized on whether you can pick it out of the local
> > curses headers.

> This sounds just like what Mark did. Or maybe I'm reading you wrong.

I think what Eric means is moving the ncurses 'has_key' function into the
cursesmodule directly, so that there is an implementation for it on all
platforms. (Unsure if that's feasible, though.) Or if he doesn't, he doesn't
realize that it's already conditional, and hence not too useful in
cursesmodule -- you can't rely on it being there.

How about a fake has_key for systems that have strict XPG4 or SVr4 curses,
that assumes the terminal in question has a minimal set of function keys ?
I'm thinking 'vt100' here, given the abundance of vt100(-derived) terminals,
but a smaller set would be fine, too, I think.

Oh, and perhaps an autoconf test on has_key is a better idea than a platform
specific #ifdef -- if people port ncurses to that platform, they'd get
has_key after all.

Thomas Wouters <thomas@xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!