• thesdev@feddit.org
    link
    fedilink
    arrow-up
    8
    arrow-down
    1
    ·
    7 days ago

    Curses is a Python standard library module (for those who like me have never had anything to do with Python).

    • optional@sh.itjust.works
      link
      fedilink
      arrow-up
      21
      ·
      7 days ago

      Actually, curses is much older than Python. It’s a generic library to allow standardized output on non-standardized text terminals. If you see text based user interfaces on Posix systems, you can be 99% sure that it’s based on curses (or its successor ncurses).

      Developed for C in the late 1970s, it now has bindings for dozens of languages from Ada to Zig

      • esc@piefed.social
        link
        fedilink
        English
        arrow-up
        3
        ·
        7 days ago

        Do people still use original curses and not ncurses (which is a bit newer than python)?

        • optional@sh.itjust.works
          link
          fedilink
          arrow-up
          3
          ·
          edit-2
          7 days ago

          I’m not too deep into the history of curses, but as far as I read, ncurses was just a rebranding of pcurses when a new maintainer took over. And pcurses is an open source clone of curses from 1983.

          So whether python or ncurses is newer depends on if you consider the renaming as the birth of ncurses, or the date when its first line of code was written.

    • Malgas@beehaw.org
      link
      fedilink
      English
      arrow-up
      3
      ·
      7 days ago

      Not just Python. It’s a terminal control library for Unix-like systems (originally BSD, but widely ported).