Name | curses-menu JSON |
Version |
0.9.0
JSON |
| download |
home_page | None |
Summary | A simple console menu system using curses |
upload_time | 2024-09-05 23:54:49 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.9 |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
|Build Status|\ |Documentation Status|\ |Coverage Status|
curses-menu
===========
A simple Python menu-based GUI system on the terminal using curses.
Perfect for those times when you need a GUI, but don’t want the overhead
or learning curve of a full-fledged GUI framework. However, it's also
flexible enough to do cool stuff like on-the-fly changing of menus and is extensible to
a large variety of uses.
http://curses-menu.readthedocs.org/en/latest/
.. image:: ./images/curses-menu_screenshot1.png
Installation
~~~~~~~~~~~~
Tested on Python 3.8+ pypy and pypy3.
The curses library comes bundled with python on Linux and MacOS. Windows
users can visit http://www.lfd.uci.edu/~gohlke/pythonlibs/#curses and
get a third-party build for your platform and Python version.
Then just run
.. code:: shell
pip install curses-menu
Usage
-----
It’s designed to be pretty simple to use. Here’s an example
.. code:: python
menu = CursesMenu("Root Menu", "Root Menu Subtitle")
item1 = MenuItem("Basic item that does nothing", menu)
function_item = FunctionItem("FunctionItem, get input", input, ["Enter an input: "])
print(__file__)
command_item = CommandItem(
"CommandItem that opens another menu",
f"python {__file__}",
)
submenu = CursesMenu.make_selection_menu([f"item{x}" for x in range(1, 20)])
submenu_item = SubmenuItem("Long Selection SubMenu", submenu=submenu, menu=menu)
submenu_2 = CursesMenu("Submenu Title", "Submenu subtitle")
function_item_2 = FunctionItem("Fun item", input, ["Enter an input"])
item2 = MenuItem("Another Item")
submenu_2.items.append(function_item_2)
submenu_2.items.append(item2)
submenu_item_2 = SubmenuItem("Short Submenu", submenu=submenu_2, menu=menu)
menu.items.append(item1)
menu.items.append(function_item)
menu.items.append(command_item)
menu.items.append(submenu_item)
menu.items.append(submenu_item_2)
menu.start()
_ = menu.join()
Testing Information
-------------------
Currently the platforms I'm manually testing on are MacOS in iTerm2 on zsh with and without TMUX and Windows 10\
with both powersehll and cmd.exe in and out of Windows Terminal. If a bug pops up on another configuration, \
no promises that I'll be able to reproduce it.
.. |Build Status| image:: https://github.com/pmbarrett314/curses-menu/actions/workflows/github-action-tox.yml/badge.svg
:target: https://github.com/pmbarrett314/curses-menu/actions/workflows/github-action-tox.yml/badge.svg
.. |Documentation Status| image:: https://readthedocs.org/projects/curses-menu/badge/?version=latest
:target: http://curses-menu.readthedocs.org/en/latest/?badge=latest
.. |Coverage Status| image:: https://coveralls.io/repos/github/pmbarrett314/curses-menu/badge.svg?branch=develop
:target: https://coveralls.io/github/pmbarrett314/curses-menu?branch=develop
Raw data
{
"_id": null,
"home_page": null,
"name": "curses-menu",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": "Paul Barrett <pmbarrett314@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/f5/d0/b1e36f29937b6c5dd75563deebb7224dd71ea0b471ee9c44df601a7be7f9/curses_menu-0.9.0.tar.gz",
"platform": null,
"description": "|Build Status|\\ |Documentation Status|\\ |Coverage Status|\n\ncurses-menu\n===========\n\nA simple Python menu-based GUI system on the terminal using curses.\nPerfect for those times when you need a GUI, but don\u2019t want the overhead\nor learning curve of a full-fledged GUI framework. However, it's also\nflexible enough to do cool stuff like on-the-fly changing of menus and is extensible to\na large variety of uses.\n\nhttp://curses-menu.readthedocs.org/en/latest/\n\n.. image:: ./images/curses-menu_screenshot1.png\n\n\nInstallation\n~~~~~~~~~~~~\n\nTested on Python 3.8+ pypy and pypy3.\n\nThe curses library comes bundled with python on Linux and MacOS. Windows\nusers can visit http://www.lfd.uci.edu/~gohlke/pythonlibs/#curses and\nget a third-party build for your platform and Python version.\n\nThen just run\n\n.. code:: shell\n\n pip install curses-menu\n\nUsage\n-----\n\nIt\u2019s designed to be pretty simple to use. Here\u2019s an example\n\n.. code:: python\n\n menu = CursesMenu(\"Root Menu\", \"Root Menu Subtitle\")\n item1 = MenuItem(\"Basic item that does nothing\", menu)\n function_item = FunctionItem(\"FunctionItem, get input\", input, [\"Enter an input: \"])\n print(__file__)\n command_item = CommandItem(\n \"CommandItem that opens another menu\",\n f\"python {__file__}\",\n )\n\n submenu = CursesMenu.make_selection_menu([f\"item{x}\" for x in range(1, 20)])\n submenu_item = SubmenuItem(\"Long Selection SubMenu\", submenu=submenu, menu=menu)\n\n submenu_2 = CursesMenu(\"Submenu Title\", \"Submenu subtitle\")\n function_item_2 = FunctionItem(\"Fun item\", input, [\"Enter an input\"])\n item2 = MenuItem(\"Another Item\")\n submenu_2.items.append(function_item_2)\n submenu_2.items.append(item2)\n submenu_item_2 = SubmenuItem(\"Short Submenu\", submenu=submenu_2, menu=menu)\n\n menu.items.append(item1)\n menu.items.append(function_item)\n menu.items.append(command_item)\n menu.items.append(submenu_item)\n menu.items.append(submenu_item_2)\n\n menu.start()\n _ = menu.join()\n\nTesting Information\n-------------------\n\nCurrently the platforms I'm manually testing on are MacOS in iTerm2 on zsh with and without TMUX and Windows 10\\\nwith both powersehll and cmd.exe in and out of Windows Terminal. If a bug pops up on another configuration, \\\nno promises that I'll be able to reproduce it.\n\n.. |Build Status| image:: https://github.com/pmbarrett314/curses-menu/actions/workflows/github-action-tox.yml/badge.svg\n :target: https://github.com/pmbarrett314/curses-menu/actions/workflows/github-action-tox.yml/badge.svg\n.. |Documentation Status| image:: https://readthedocs.org/projects/curses-menu/badge/?version=latest\n :target: http://curses-menu.readthedocs.org/en/latest/?badge=latest\n.. |Coverage Status| image:: https://coveralls.io/repos/github/pmbarrett314/curses-menu/badge.svg?branch=develop\n :target: https://coveralls.io/github/pmbarrett314/curses-menu?branch=develop\n",
"bugtrack_url": null,
"license": null,
"summary": "A simple console menu system using curses",
"version": "0.9.0",
"project_urls": {
"Changelog": "https://github.com/pmbarrett314/curses-menu/blob/master/CHANGELOG.rst",
"Documentation": "https://curses-menu.readthedocs.io/en/latest/",
"Homepage": "http://github.com/pmbarrett314/curses-menu",
"Issues": "https://github.com/pmbarrett314/curses-menu/issues",
"Repository": "http://github.com/pmbarrett314/curses-menu"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6f7b8c1aeda890e6af299bfb56ecab40dde188e95b67d1852a6e63612d85f74a",
"md5": "411ac5fdafdd0289d2e7e3d741a7f8b8",
"sha256": "fb24df4948c32216663439470630b9732a16d09bbbb533c5b0aa8205aeb292fd"
},
"downloads": -1,
"filename": "curses_menu-0.9.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "411ac5fdafdd0289d2e7e3d741a7f8b8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 17477,
"upload_time": "2024-09-05T23:54:48",
"upload_time_iso_8601": "2024-09-05T23:54:48.820808Z",
"url": "https://files.pythonhosted.org/packages/6f/7b/8c1aeda890e6af299bfb56ecab40dde188e95b67d1852a6e63612d85f74a/curses_menu-0.9.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f5d0b1e36f29937b6c5dd75563deebb7224dd71ea0b471ee9c44df601a7be7f9",
"md5": "42bf2b7259a3764a00b2c28cd560ef98",
"sha256": "2d4dc7f3ed27377b3f455dd56cbe87d1bc4e9c09af558dc89eb01e36fe95eb97"
},
"downloads": -1,
"filename": "curses_menu-0.9.0.tar.gz",
"has_sig": false,
"md5_digest": "42bf2b7259a3764a00b2c28cd560ef98",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 76307,
"upload_time": "2024-09-05T23:54:49",
"upload_time_iso_8601": "2024-09-05T23:54:49.873362Z",
"url": "https://files.pythonhosted.org/packages/f5/d0/b1e36f29937b6c5dd75563deebb7224dd71ea0b471ee9c44df601a7be7f9/curses_menu-0.9.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-05 23:54:49",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "pmbarrett314",
"github_project": "curses-menu",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "curses-menu"
}