curses-menu


Namecurses-menu JSON
Version 0.7.1 PyPI version JSON
download
home_pagehttp://github.com/pmbarrett314/curses-menu
SummaryA simple console menu system using curses
upload_time2023-06-27 22:30:48
maintainer
docs_urlNone
authorPaul Barrett
requires_python>=3.8,<4.0
licenseMIT
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": "http://github.com/pmbarrett314/curses-menu",
    "name": "curses-menu",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Paul Barrett",
    "author_email": "pmbarrett314@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/7a/a8/b9f5d662623d845dd4b850134a39b4e360044e3b7d8ed16f4c8817fb634d/curses_menu-0.7.1.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\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A simple console menu system using curses",
    "version": "0.7.1",
    "project_urls": {
        "Homepage": "http://github.com/pmbarrett314/curses-menu",
        "Repository": "http://github.com/pmbarrett314/curses-menu"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "591eb2db3078243e33ac19927fefdfdcd5da79eb19af7916b55ae882c9568478",
                "md5": "318409306c64d05744165d1f4fa6ad35",
                "sha256": "f7ead87af170e3f6cd956de96145e4f8d5dab28a2dba6469a58861ae8d8beaba"
            },
            "downloads": -1,
            "filename": "curses_menu-0.7.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "318409306c64d05744165d1f4fa6ad35",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 38932,
            "upload_time": "2023-06-27T22:30:46",
            "upload_time_iso_8601": "2023-06-27T22:30:46.661145Z",
            "url": "https://files.pythonhosted.org/packages/59/1e/b2db3078243e33ac19927fefdfdcd5da79eb19af7916b55ae882c9568478/curses_menu-0.7.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7aa8b9f5d662623d845dd4b850134a39b4e360044e3b7d8ed16f4c8817fb634d",
                "md5": "f5dfcff7afada880e08d408a746d5613",
                "sha256": "1dc1941760c7a76269f13e9f042388083fe6021f50dfce1f8e5a5779b24f5711"
            },
            "downloads": -1,
            "filename": "curses_menu-0.7.1.tar.gz",
            "has_sig": false,
            "md5_digest": "f5dfcff7afada880e08d408a746d5613",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 25567,
            "upload_time": "2023-06-27T22:30:48",
            "upload_time_iso_8601": "2023-06-27T22:30:48.550455Z",
            "url": "https://files.pythonhosted.org/packages/7a/a8/b9f5d662623d845dd4b850134a39b4e360044e3b7d8ed16f4c8817fb634d/curses_menu-0.7.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-27 22:30:48",
    "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"
}
        
Elapsed time: 0.07989s