Bill-Gray / PDCursesMod

Public Domain Curses - a curses library for environments that don't fit the termcap/terminfo model, modified and extended from the 'official' version
https://www.projectpluto.com/win32a.htm
341 stars 73 forks source link

PDCursesMod and Unicurses (Python) #205

Closed Bill-Gray closed 2 years ago

Bill-Gray commented 3 years ago

I've had an inquiry about use of PDCursesMod and Unicurses. Unicurses provides a way for Python code to access Curses functions, using ncurses on *nix and PDCurses 3.4 on Microsoft Windows.

Unicurses appears to be abandonware (last version was in 2010). Some work will be required to get it to work with PDCursesMod. Key codes are different, for example, and it'd be nice if 64-bit chtypes were used instead of the old 32-bit ones.

If anyone has gotten PDCursesMod to work with Python, either with Unicurses or other, I'd be curious as to your experience and whether you got it to work.

I'd also like to be able to set up Unicurses such that it can use PDCursesMod on all systems, including nix ones, instead of only doing so on MSWin. This would help both for testing and for allowing Python programmers on nix to access the various nifty things we've added to PDCursesMod.

A side note : I expect to add ncurses-style debug tracing so that tracing can be done in a compatible manner with either ncurses or PDCursesMod. This can be done while retaining binary compatibility; the existing PDCurses trace functions will still work. Being able to do debug tracing would be quite helpful at this point.

GitMensch commented 3 years ago

I expect to add ncurses-style debug tracing so that tracing can be done in a compatible manner with either ncurses or PDCursesMod. This can be done while retaining binary compatibility; the existing PDCurses trace functions will still work. Being able to do debug tracing would be quite helpful at this point.

That one should be tracked under a different issue, also to be referenced in commit messages. I'll move this part out.

GitMensch commented 3 years ago

This sounds like an interesting approach, I just wonder if it is worth a lot of effort because the official curses module already seems to does what Unicurses tries to solve (with ncurses only, but still).

GitMensch commented 2 years ago

I suggest this to be closed because UniCurses seemingly uses pdcurses (with32bit chtypes) on win32 already, its feature list (and readme) says:

Wraps Public Domain Curses (PDCurses) using ctypes when used on Microsoft Windows.

and the reviews (that whine about pdcurses.dll being necessary) show that's true.

Bill-Gray commented 2 years ago

Yeah, I think they're stuck with 'traditional' PDCurses, and not much is going on with the project... let's close this and say that any use of PDCursesMod in Python will have to be done in some other manner.