Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python interactive CLI application?

I'm not even sure what these would be called? I used to write them in ADA running on VAX-VMS!

I want to make a simple menu-driven application that would let me display menus and use the cursor keys to navigate around them, choose items and navigate around the app. All fully old school text based.

I want to be able to take over the whole terminal window and display stuff in different places.

Is this possible in Python?

like image 769
MalphasWats Avatar asked Jun 03 '12 19:06

MalphasWats


People also ask

What is a Python command line application?

Command-line applications, also referred to as Console Applications, are computer programs designed to be used from a text interface, such as a shell.

Is CLI interactive?

The IBM MobileFirst™ Platform Command Line Interface (CLI) supports two modes of operation: interactive mode and direct mode.

How do you use interactive in Python?

How to Run Python Code Interactively. A widely used way to run Python code is through an interactive session. To start a Python interactive session, just open a command-line or terminal and then type in python , or python3 depending on your Python installation, and then hit Enter .


2 Answers

Check out the Python HOWTO on Curses Programming with Python and here is the library reference.

like image 118
Levon Avatar answered Oct 21 '22 03:10

Levon


Another easy to use library is Urwid - Console User Interface Library.

http://excess.org/urwid/

http://excess.org/urwid/examples.html

like image 31
Taha Jahangir Avatar answered Oct 21 '22 03:10

Taha Jahangir