> From: Dan Stromberg <drsali...@gmail.com> 
> Sent: Monday, June 14, 2021 12:36 AM
> To: pjfarl...@earthlink.net
> Cc: Python List <python-list@python.org>
> Subject: Re: Has anone seen or know of a CFFI wrapper for PDCurses?
>
> > On Sun, Jun 13, 2021 at 12:50 AM <mailto:pjfarl...@earthlink.net> wrote:
> > Hi All,
> >
> > I have been investigating the possibility of wrapping the PDCurses DLL on
> > Windows (or even better the PDCursesMod fork) using cffi instead of ctypes. 
> > The unicurses project tried this using ctypes 11 years ago but unicurses
> > hasn't been worked on since 2010, and it shows its age.
>
> An option for your consideration: Maybe port Python's included curses module 
> to PDCursesMod?

An interesting idea, to be sure, and one I have looked at to some extent.  One 
thing that I've never quite learned is whether the included curses and 
curses_panel modules statically link a copy of the ncurses library on *ix 
systems or whether they invoke the ncurses.so library dynamically.

If it is designed to invoke the ncurses and panels subroutines from the shared 
library it could be a possible path.

One obstacle I thought that I saw is that building cpython modules based on 
non-python library sources AssUMes that the build process can get the library 
source from the cpython repository, rather than from a non-python external 
source repository.  I have built some scripts to get around that assumption, 
but they would have to be integrated into the cpython external library build 
process for any wide distribution.

And there are some differences between the PDCurses and ncurses assumed 
internal structures and what is externalized and what is not that might make 
that harder than it first appears.

Plus taking that path really does requires the porter to learn at least the 
generics of the cpython internal macros and functions in order to be able to 
debug the result, which is a little bit daunting.  Not impossible, but many 
molehills look like mountains to the uninitiated.

Anyway, I am just investigating options at present, so thanks for the 
suggestion.

Peter


-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to