Git Product home page Git Product logo

Comments (5)

wmcbrine avatar wmcbrine commented on May 20, 2024

In retrospect, I think it was a terrible mistake to ever include them. I'm not inclined to bring them back.

Linking _cursesmodule.c against PDCurses didn't actually work anyway, did it? I mean, in terms of the result being usable. That's why there are multiple alternative Python curses interfaces to work with PDCurses, is it not?

I think the correct approach would be to make Python's curses API more portable. Relying on non-working stubs is not the way. (And, it's mostly not possible to make them work -- PDCurses just isn't designed that way at all.)

from pdcurses.

ulfalizer avatar ulfalizer commented on May 20, 2024

Works fine after making some minor modifications and #defining a few macros.

The README in the windows-curses repository has an overview of how _cursesmodule.c fits into things. I think all Python/PDCurses integrations link against it. The prebuilt wheels from Christoph Gohlke also do (windows-curses is just those wheels set up for rebuilding).

We've been using it to make a menuconfig interface available on Windows in addition to Linux. The only special-casing in the code is related to resizing (see _get_wch_compat() in menuconfig.py).

from pdcurses.

ulfalizer avatar ulfalizer commented on May 20, 2024

Random idea:

Do you think they could be hidden behind a PDCurses compile-time setting? That way, you'd have to explicitly ask for them, and you wouldn't get code compliling but silently failing because it expects the stubs to work otherwise.

Can see if you don't want to litter the code up like that though.

from pdcurses.

cgohlke avatar cgohlke commented on May 20, 2024

Try to compile (and link) a copy of terminfo.c when building the _cursesmodule Python extension with the new PDCurses. Works for me.

from pdcurses.

ulfalizer avatar ulfalizer commented on May 20, 2024

@cgohlke
Seems like the least painful option. Thanks for the idea!

from pdcurses.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.