Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7917391
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T15:07:41+00:00 2026-06-03T15:07:41+00:00

I created a Python command-line application. One of the features is that it prints

  • 0

I created a Python command-line application. One of the features is that it prints a list of items taken from database when you call it with -l switch. Each item has associated a detailed description.

1: item1
2: item2
3: item3
4: item4

What is a good pattern for TUI design (in command-line) to be intuitive and comfortable for the user when he wants to display a description for particular item in the list?

Now, my app is quite cumbersome. The item is prefixed by number and when you want to see a description, function getch() waits for key press in the interval (1..9) and prints a description for item with given index. I can’t use mouse position (which would be more comfortable) because it’s command-line application. Another thing is, where is the most suitable place to print a description, to be able to repeatedly remove it and print description for another item, so the screen is not cluttered with uninteresting information? The user should display only the information that interests him in a particular moment.

The length of the list is unlimited. The interval (0..9) is temporary solution.

What is a good practice for this TUI design? Would you use some TUI library helping with this? If so, show some typical pattern with or without using a library of your choice.

I’m using Python, but feel free to use another imperative language in case the same can be achieved in Python

Thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T15:07:43+00:00Added an answer on June 3, 2026 at 3:07 pm

    1) This question https://stackoverflow.com/questions/791261/python-text-user-interface in its answers have many great libraries mentioned which seem fit for this task.

    2) I would suggest to provide Arrow Keys as valid input [some of the libraries above can handle this] intead of only number based section. For example the NCDU tool (which is an ncurse based disk usage tool) has a great text based UI using arrow keys, you might want to refer to it as an example.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've created a python script that's intended to be used from the command line.
I have a python script that, once executed from command line, performs the needed
How can you use imagemagick from python without opening a new command line window
I want to call a subprocess to backup mysql database. A command line which
I created a python .py with some sort methods. I'm using numpy so that
I'm using Python 2.x [not negotiable] to read XML documents [created by others] that
I'm really new to Python and Django. I created a class in Python that
I have designed a small application in Python under Windows, that uses opencv. I
To add the directory to my python path, I went into the command line,
I'm writing a command line application and would like the user to be able

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.