Re: Termcap /curses

Lou Kates (lou@VAX.TELERIDE.ON.CA)
Fri, 15 Oct 1993 14:02:41 -0400

> > | Note that in principle you could do it all in Python -- with the
> > | (optional) fcntl module you can make the necessary ioctl calls and
> > | then just read the termcap file and generate the proper calls.
> >
> > You would have to re-implement the mapping from generic terminfo/termcap
> > strings to actual escape sequences including padding; reimplement some form
> > of curses etc. Not that it couldn't be done, but I think you're getting
> > into more than you ever bargained for...
>
> Not only this, but the curses packages also take into account terminals
>that have strange behavior.. I can see a LOT of recoding trying to
>make a PYTHON version of curses instead of just creating an interface to
>it.. Also, by recreating a python version, I would not have
>any of the menu and form libraries available that come with my
>curses libraries..
>

Another approach would be to develop a C to Python translator.
That would also be a large amount of work and its conceivable
that certain features would have to be added to Python to make it
feasible but it would allow one to translate not only the bulk of
the curses source but many other C libraries all in one go.

Lou Kates, louk@teleride.on.ca