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 last edited by
@daraux Why a TUI over a GUI? Is it issues with cross-platform support?
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.
dgelessus last edited by
As I understand it, the main functionality of
cursesis 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
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
cursesin 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,
getpass.getpassfor 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.
Thanks dgelessus, that helps me understand why it's not really doable under Pythonista. Cheers.