Python Forum

Full Version: CLI modules
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm looking into making cool terminal-based GUI, and terminal-based games. But I can't find any good information or tutorials that will teach me from the start, how to use curses. I found a guy on youtube called "Indian Pythonista" but he's the only person I've found that makes Curses tutorials. The problem with Indian Pythonista is that he doesn't explain enough for me, and it's kind of hard to follow along with his tutorials. If you can help me out, I'd appreciate it!
I won't answer the question because I've never written a sophisticated program or a game directly with the curses library and my attempts to do so go back to the 1990's, but if you only want terminal based GUIs to interact nicely with ordinary programs (as opposed to games), an excellent choice is pythondialog. I use it for several programs, it works very well and it also works across ssh, thus allowing to interact with remote programs. Another library to consider is Urwid. Both of these high level libraries are much simpler to use than the full low level ncurses library although of course they don't have the same potential.
So I've tried using curses. I want to create a game inside the console, but, I want a nice gui.. I can't find any good modules to do what I want, I can't find any tutorials that can help with this. Someone suggested I used "PythonDialog" and "Urwid" but My school blocks all of the documentation websites for both of them and what I've seen of those, I don't think they'd do what I'm looking for but I may be wrong. I just want an interactive gui that I can, for example, ask the user a question and have 2 options and the user can then use the left and right arrows to highlight their answer and use enter to select it. Any information would be much appreciated, although if you link documentation websites my school more than likely blocks it. Thank you!

Also, I'd like to add that I'm fairly new to Python so I'm looking for something simple that I can use on repl.it since I can't use anything else on these garbage school chromebooks.
I'm guessing that last requirement (use on repl.it) limits you to what's in the standard library? I'm not sure those websites allow you to install third party libraries.
(Mar-09-2020, 06:57 PM)ndc85430 Wrote: [ -> ]I'm guessing that last requirement (use on repl.it) limits you to what's in the standard library? I'm not sure those websites allow you to install third party libraries.
exactly my first thought, but it looks like repl.it gives some flexibility in that respect and one can install packages Not clear what limitations there are
prompt_toolkit
urwid
npyscreen

Try these out.
For the TUI.
(Mar-09-2020, 07:00 PM)buran Wrote: [ -> ]
(Mar-09-2020, 06:57 PM)ndc85430 Wrote: [ -> ]I'm guessing that last requirement (use on repl.it) limits you to what's in the standard library? I'm not sure those websites allow you to install third party libraries.
exactly my first thought, but it looks like repl.it gives some flexibility in that respect and one can install packages Not clear what limitations there are

It's actually really flexible. you can use most 3rd party modules on it, that's why I use it