• thesdev@feddit.org
    link
    fedilink
    arrow-up
    9
    ·
    9 hours 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
      ·
      9 hours 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
        4
        ·
        9 hours 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
          4
          ·
          edit-2
          4 hours 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
      4
      ·
      9 hours ago

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

      • optional@sh.itjust.works
        link
        fedilink
        arrow-up
        7
        ·
        8 hours ago

        It’s a console tool for image manipulation. Basically Photoshop with a command line interface. It’s working in the background of a lot of other software for image editing. Though it had problems with an unstable CLI interface in the past, so if you plan to use it in scripts, you might want to look at graphicsmagick which is a fork aiming for a more stable API.