omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Curses/TUI alternative

    Pythonista
    curses
    3
    5
    3581
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • daraux
      daraux last edited by

      Hi everyone,

      Python noob here. From my understanding, Pythonista does not support curses module. Does anyone know of alternatives to provide a cross platform Text User Interface that plays well with Pythonista? So far I've been using a self-made bare bones menu system but wondering if there are any recommendations of TUI frameworks that Pythonista support.

      Thanks in advance!

      Webmaster4o 1 Reply Last reply Reply Quote 0
      • Webmaster4o
        Webmaster4o @daraux last edited by

        @daraux Why a TUI over a GUI? Is it issues with cross-platform support?

        1 Reply Last reply Reply Quote 0
        • daraux
          daraux last edited by

          Yes I should have prefaced my thread by saying that. Interactive scripts running across multiple platforms (Linux, *BSD). Curses is easiest enough to work with but breaks on iOS. I use my iPad for about 25% of my work so using a common interface would be nice :-). Any suggestions would be appreciated.

          1 Reply Last reply Reply Quote 1
          • dgelessus
            dgelessus last edited by

            As I understand it, the main functionality of curses is manipulating a traditional terminal display's properties, such as cursor position, text color and style, whether keyboard input is echoed, etc. The Pythonista console is not very similar to a "real" terminal or even a terminal emulator like cmd.exe, Terminal.app or xterm. The Pythonista console displays continuous rich text output and has a separate input text field. Terminals are based on a grid of monospace characters and a freely moving cursor, which may be used for normal text I/O, but can also be modified arbitrarily. It would be very difficult to emulate curses in the normal Pythonista console without some major redesigning (which I would not find very useful IMHO).

            Recent versions of stash provide limited terminal emulation, most importantly cursor movement detection (for more advanced features than basic line editing) and understanding of ANSI escape codes for text formatting.

            If you want to write a program that runs well on Pythonista and normal computers, then you're basically stuck with command-line arguments, print, raw_input and getpass.getpass for user interaction. Advanced terminal features aren't supported by Pythonista itself, and none of the major desktop GUI frameworks are available for iOS (let alone Pythonista) either.

            1 Reply Last reply Reply Quote 2
            • daraux
              daraux last edited by

              Thanks dgelessus, that helps me understand why it's not really doable under Pythonista. Cheers.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Powered by NodeBB Forums | Contributors