On Sun, Jun 13, 2021 at 10:42 PM <pjfarl...@earthlink.net> wrote: > > 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. > Why would it matter?
Anyway, if I start up a CPython 3.9, import curses, and lsof the interpreter, I can see: $ lsof -p 26258 | grep curses below cmd output started 2021 Mon Jun 14 07:04:25 AM PDT python3 26258 dstromberg mem REG 254,1 231360 25167676 /usr/lib/x86_64-linux-gnu/libncursesw.so.6.1 python3 26258 dstromberg mem REG 254,1 546400 1316749 /usr/local/cpython-3.9/lib/python3.9/lib-dynload/_ curses.cpython-39-x86_64-linux-gnu.so ...which would seem to say that curses is brought into the interpreter on demand, from a shared object (dll). HTH. -- https://mail.python.org/mailman/listinfo/python-list