Skip to content

NoClearPick is a terminal selection menu creator heavily inspired by Pick, with the main difference being that this does not clear your terminal.

Notifications You must be signed in to change notification settings

HadiAssadDiab/NoClearPick

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

NoClearPick

NoClearPick is a terminal selection menu creator heavily inspired by Pick, with the main difference being that this does not clear your terminal

Usage

Code:

from NoClearPick import noclearpick

option, index = noclearpick(
        options = ["Hello, World!", "Howdy!", "Bonjour", "Hey", "Greetings earthling", "Guten Tag!"],
        title = "Pick the best greeting (use arrow keys to select and enter to pick):",
        indicator = "=>",
        default_index = 0
        )
print(option)
print(index)

Output:

Pick the best greeting (use arrow keys to select and enter to pick):
 => Hello, World!
    Howdy!
    Bonjour
    Hey
    Greetings earthling
    Guten Tag!
Hello, World!
0

Install dependency:

pip install get-key

Options

  • options: a list of options to choose from
  • title: (optional) a title above options list
  • indicator: (optional) custom the selection indicator, defaults to *
  • default_index: (optional) set this if the default selected option is not the first one

About

NoClearPick is a terminal selection menu creator heavily inspired by Pick, with the main difference being that this does not clear your terminal.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages