Skip to content

rzakaan/terminal-menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terminal Menu

Creates a text-based menu in shell.

Usage

Document

Types of fonts used

  • REGULAR
  • BOLD
  • ITALIC
  • UNDERLINE
  • BLINK
  • INVERT

Types of foreground and background color

  • BLACK
  • RED
  • GREEN
  • YELLOW
  • BLUE
  • MAGENTA
  • CYAN
  • WHITE
  • UNKNOWN
  • DEFAULT

Example

setFont(Font.BOLD)
setColor(FgColor.RED)
setBgColor(BgColor.WHITE)
print("Hello World")

Show Menu List

Writes the given list to the screen in the form of a menu and returns the selected item

Parameters

Params Type Description
title str The menu title that will be written to the screen
options list [str] The menu options that will be written to the screen
info str The digest information of menu that will be written to the screen afte menu title
multiple bool Multiple choices
selected list [str] To show the pre-selected ones

Return

  • if multi selection is enabled then return list
  • else return selection value
showMenu(title, options, info, multiple=False, selected=[]):

options = ['Start', 'Settings', 'Exit']
showMenu('Tasks', options):

About

Terminal Menu For Python Development

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published