{ "info": { "author": "Ingo Heimbach", "author_email": "i.heimbach@fz-juelich.de", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "License :: OSI Approved :: MIT License", "Operating System :: MacOS", "Operating System :: POSIX :: Linux", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3 :: Only", "Topic :: Terminals", "Topic :: Utilities" ], "description": "# Simple Terminal Menu\n\n## Overview\n\n`simple-term-menu` creates simple menus for interactive command line programs. It can be used to offer a choice of\ndifferent options to the user. Menu entries can be selected with the arrow or j/k keys. The module uses the terminfo\ndatabase to detect terminal features automatically and disables styles that are not available.\nCurrently, Linux and macOS are supported.\n\n## Installation\n\n`simple-term-menu` is available on PyPI for Python 3.3+ and can be installed with `pip`:\n\n```bash\npython3 -m pip install simple-term-menu\n```\n\n## Usage\n\n### Create a menu with the default style\n\nCreate an instance of the class `TerminalMenu` and pass the menu entries as a list of strings to the constructor. Call\nthe `show` method to output the menu and wait for keyboard input:\n\n```python\n#!/usr/bin/env python3\n\nfrom simple_term_menu import TerminalMenu\n\n\ndef main():\n terminal_menu = TerminalMenu([\"entry 1\", \"entry 2\", \"entry 3\"])\n terminal_menu.show()\n\n\nif __name__ == \"__main__\":\n main()\n```\n\nYou will get an output like:\n\n![screenshot_basic](https://raw.githubusercontent.com/IngoHeimbach/simple-term-menu/master/basic.png)\n\nYou can now select a menu entry and accept your choice by hitting enter or cancel the menu with escape or `-C`.\n`show` returns the selected menu entry index or `None` if the menu was canceled.\n\nYou can pass an optional `title` to the `TerminalMenu` constructor which will be placed above the menu.\n\n### Styling\n\nYou can pass styling arguments to the `TerminalMenu` constructor. Each style is a tuple of keyword strings. Currently\nthe following keywords are accepted:\n\n- `bg_black`\n- `bg_blue`\n- `bg_cyan`\n- `bg_gray`\n- `bg_green`\n- `bg_purple`\n- `bg_red`\n- `bg_yellow`\n- `fg_black`\n- `fg_blue`\n- `fg_cyan`\n- `fg_gray`\n- `fg_green`\n- `fg_purple`\n- `fg_red`\n- `fg_yellow`\n- `bold`\n- `italics`\n- `standout`\n- `underline`\n\nYou can alter the following styles:\n\n- `menu_cursor_style`: The style of the shown cursor. The default style is `(\"fg_red\", \"bold\")`.\n\n- `menu_highlight_style`: The style of the selected menu entry. The default style is `(\"standout\",)`\n\nBy setting `menu_cursor` you can define another cursor or disable it (`None`). The default cursor is `\"> \"`.\n\n### Command line program\n\n`simple-term-menu` can be used as a terminal program in shell scripts. The exit code of the script is the 1-based index\nof the selected menu entry. The exit code 0 reports the cancel action. The following command line arguments are\nsupported:\n\n```\nusage: simple-term-menu [-h] [-c CURSOR] [-s CURSOR_STYLE]\n [-m HIGHLIGHT_STYLE] [-C] [-V]\n entries [entries ...]\n\nsimple-term-menu creates simple interactive menus in the terminal and returns the selected entry as exit code.\n\npositional arguments:\n entries the menu entries to show\n\noptional arguments:\n -h, --help show this help message and exit\n -t TITLE, --title TITLE\n menu title\n -c CURSOR, --cursor CURSOR\n menu cursor (default: > )\n -s CURSOR_STYLE, --cursor_style CURSOR_STYLE\n style for the menu cursor as comma separated list\n (default: fg_red,bold)\n -m HIGHLIGHT_STYLE, --highlight_style HIGHLIGHT_STYLE\n style for the selected menu entry as comma separated\n list (default: standout)\n -C, --no-cycle do not cycle the menu selection\n -V, --version print the version number and exit\n```\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/IngoHeimbach/simple-term-menu", "keywords": "terminal,menu,choice", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "simple-term-menu", "package_url": "https://pypi.org/project/simple-term-menu/", "platform": "", "project_url": "https://pypi.org/project/simple-term-menu/", "project_urls": { "Homepage": "https://github.com/IngoHeimbach/simple-term-menu" }, "release_url": "https://pypi.org/project/simple-term-menu/0.4.0/", "requires_dist": null, "requires_python": "~=3.3", "summary": "A Python package which creates simple interactive menus on the command line.", "version": "0.4.0" }, "last_serial": 5741537, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "f09110cbff2896606d5b331efd657c1d", "sha256": "b7dfdb72b452334073517586b68a53655a36b099feb91a39d4525efd3933e8cd" }, "downloads": -1, "filename": "simple_term_menu-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "f09110cbff2896606d5b331efd657c1d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": "~=3.3", "size": 5555, "upload_time": "2019-08-15T08:40:45", "url": "https://files.pythonhosted.org/packages/a0/91/69cb42ccd71aa4872590d1ca402ca6d82ba1f4952d551f4272694761a17d/simple_term_menu-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2132ac0173bf789a601c7dfaf9857f50", "sha256": "b59e3636bca56fce7bc698bf3b1ec7d36461b6a78198062993c82e0a431af3e7" }, "downloads": -1, "filename": "simple-term-menu-0.1.0.tar.gz", "has_sig": false, "md5_digest": "2132ac0173bf789a601c7dfaf9857f50", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.3", "size": 5485, "upload_time": "2019-08-15T08:40:47", "url": "https://files.pythonhosted.org/packages/fc/33/da9b508d55df9a8c05ece72b2ff04e2f24113752c5c6528a7d407113d0f4/simple-term-menu-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "eee420da5a2208304905896c76b0d3be", "sha256": "2ff5ecee8948b216f0b0b90f4960f76277ae03799cad85d418a8dc0eaaf9d97a" }, "downloads": -1, "filename": "simple_term_menu-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "eee420da5a2208304905896c76b0d3be", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": "~=3.3", "size": 6880, "upload_time": "2019-08-15T09:23:53", "url": "https://files.pythonhosted.org/packages/05/72/d81f4daae3ba5de092e987d4af24171a1dc65deb4a841e515308b78c56af/simple_term_menu-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f63bb4e3c30af3317a9bca9e96c54377", "sha256": "f0b7cdfce08c7ee2be65768aa2c71f572a8de869df359f918854e51331fd4f0b" }, "downloads": -1, "filename": "simple-term-menu-0.2.0.tar.gz", "has_sig": false, "md5_digest": "f63bb4e3c30af3317a9bca9e96c54377", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.3", "size": 6635, "upload_time": "2019-08-15T09:23:55", "url": "https://files.pythonhosted.org/packages/33/50/19e016a4a3db33535c61e0d2e60967a9b7294dd3b4c5f7b78db0fb4d4a23/simple-term-menu-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "654d29ac8356ba4ecae9003ae2017f4c", "sha256": "57eaf47fc57ad7119cb61e68947e2a98fa33cb60d967d10e328bc4a4df994b9f" }, "downloads": -1, "filename": "simple_term_menu-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "654d29ac8356ba4ecae9003ae2017f4c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": "~=3.3", "size": 6885, "upload_time": "2019-08-15T12:41:24", "url": "https://files.pythonhosted.org/packages/12/ec/2459042ce42882b571dec36d92d080e517e97ea714ead51bb41c1842d51d/simple_term_menu-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c26b1a1432e75842acfc2d7a514ab893", "sha256": "1b188357feb5dba8e094ad12de60636653b1ef1aa66ee6c42a231a4e5fdb3c91" }, "downloads": -1, "filename": "simple-term-menu-0.2.1.tar.gz", "has_sig": false, "md5_digest": "c26b1a1432e75842acfc2d7a514ab893", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.3", "size": 6642, "upload_time": "2019-08-15T12:41:26", "url": "https://files.pythonhosted.org/packages/3b/27/368ce538a4c2177a571bbc3d9a7b0c24ce96d9146cd6e9b6f91333f47a56/simple-term-menu-0.2.1.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "db1848beba0ecfb5cd517b21481ac560", "sha256": "1e3c9b34a85032ce36500fd1790d14025d4ef3621037e47451150797376ec3b2" }, "downloads": -1, "filename": "simple_term_menu-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "db1848beba0ecfb5cd517b21481ac560", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": "~=3.3", "size": 7165, "upload_time": "2019-08-15T13:25:53", "url": "https://files.pythonhosted.org/packages/0e/a3/edf0b7d61a99ff1e07cf33a552af953ba2bc9002ede2e93a32d32f9489dd/simple_term_menu-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "97db029641a2e1ff7a571a3bc320e1fd", "sha256": "f8b6f2adb0a42a542ebc01a3f0680039518c5d7c951907f2c243018b09713659" }, "downloads": -1, "filename": "simple-term-menu-0.3.0.tar.gz", "has_sig": false, "md5_digest": "97db029641a2e1ff7a571a3bc320e1fd", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.3", "size": 6937, "upload_time": "2019-08-15T13:25:55", "url": "https://files.pythonhosted.org/packages/45/80/b1ec2c6b74e9bdb1972d9a94057af722af639d19402d25c0e2bf0913a814/simple-term-menu-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "1465e56c4c670f2b31865332acd54aef", "sha256": "b0be648991df9b744407e54d3a636eaa4da708d73b38b1dd6c7f2bde58e88151" }, "downloads": -1, "filename": "simple_term_menu-0.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "1465e56c4c670f2b31865332acd54aef", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": "~=3.3", "size": 7162, "upload_time": "2019-08-16T05:59:52", "url": "https://files.pythonhosted.org/packages/48/d3/4c20bf3405caaa6c45539be1fdac8fcaffd723ef625613ca71ea357354fd/simple_term_menu-0.3.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "56e9f609275418ccd3588c4052de8ec0", "sha256": "29ecc5ad03a66027dda552f5163fe5b9b3116567d59867edf3cee5debfb071d4" }, "downloads": -1, "filename": "simple-term-menu-0.3.1.tar.gz", "has_sig": false, "md5_digest": "56e9f609275418ccd3588c4052de8ec0", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.3", "size": 6945, "upload_time": "2019-08-16T05:59:54", "url": "https://files.pythonhosted.org/packages/de/18/857a1f12f64e71b254fb6bf5dc65a65eef9a88c8798416b76a472afa883d/simple-term-menu-0.3.1.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "5a9d2898ffbec197b6c69227f3fd38db", "sha256": "34899ad26478a0375ba3341b321a748f4de152154160a69b0d2e758b30100c1a" }, "downloads": -1, "filename": "simple_term_menu-0.4.0-py3-none-any.whl", "has_sig": false, "md5_digest": "5a9d2898ffbec197b6c69227f3fd38db", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": "~=3.3", "size": 7125, "upload_time": "2019-08-28T09:27:46", "url": "https://files.pythonhosted.org/packages/b2/59/71c8d5c9d354d242da8dd247c4fab03d773bb7ff6f80a973abb503fd3a22/simple_term_menu-0.4.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "43674052d15ee938c0662ed312fefd99", "sha256": "27d9854b37ef4041352570794349c03cff6e77792d2c2b75efed4dbeb8fd8fa4" }, "downloads": -1, "filename": "simple-term-menu-0.4.0.tar.gz", "has_sig": false, "md5_digest": "43674052d15ee938c0662ed312fefd99", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.3", "size": 6903, "upload_time": "2019-08-28T09:27:47", "url": "https://files.pythonhosted.org/packages/69/fd/685062f8d18bec70bef388bc29da36a8bd95cf19d84d2f125c843c223aba/simple-term-menu-0.4.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5a9d2898ffbec197b6c69227f3fd38db", "sha256": "34899ad26478a0375ba3341b321a748f4de152154160a69b0d2e758b30100c1a" }, "downloads": -1, "filename": "simple_term_menu-0.4.0-py3-none-any.whl", "has_sig": false, "md5_digest": "5a9d2898ffbec197b6c69227f3fd38db", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": "~=3.3", "size": 7125, "upload_time": "2019-08-28T09:27:46", "url": "https://files.pythonhosted.org/packages/b2/59/71c8d5c9d354d242da8dd247c4fab03d773bb7ff6f80a973abb503fd3a22/simple_term_menu-0.4.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "43674052d15ee938c0662ed312fefd99", "sha256": "27d9854b37ef4041352570794349c03cff6e77792d2c2b75efed4dbeb8fd8fa4" }, "downloads": -1, "filename": "simple-term-menu-0.4.0.tar.gz", "has_sig": false, "md5_digest": "43674052d15ee938c0662ed312fefd99", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.3", "size": 6903, "upload_time": "2019-08-28T09:27:47", "url": "https://files.pythonhosted.org/packages/69/fd/685062f8d18bec70bef388bc29da36a8bd95cf19d84d2f125c843c223aba/simple-term-menu-0.4.0.tar.gz" } ] }