{ "info": { "author": "wong2", "author_email": "wonderfuly@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5" ], "description": "pick [![Build Status](https://travis-ci.org/wong2/pick.svg?branch=master)](https://travis-ci.org/wong2/pick) [![PyPI](https://img.shields.io/pypi/v/pick.svg)](https://pypi.python.org/pypi/pick)\n====\n\n**pick** is a small python library to help you create curses based interactive selection\nlist in the terminal. See it in action:\n\n![Demo](example/basic.gif?raw=true)\n\n\n### Installation\n\n $ pip install pick\n\nNote for Windows: curses wheels can be obtained from http://www.lfd.uci.edu/~gohlke/pythonlibs/#curses, then install it with pip, for example: `pip install curses-2.2-cp27-none-win_amd64.whl`\n\n### Usage\n\n**pick** comes with a simple api:\n\n >>> from pick import pick\n\n >>> title = 'Please choose your favorite programming language: '\n >>> options = ['Java', 'JavaScript', 'Python', 'PHP', 'C++', 'Erlang', 'Haskell']\n >>> option, index = pick(options, title)\n >>> print option\n >>> print index\n\n**outputs**\n\n >>> C++\n >>> 4\n\n**pick** multiselect example:\n\n >>> from pick import pick\n\n >>> title = 'Please choose your favorite programming language (press SPACE to mark, ENTER to continue): '\n >>> options = ['Java', 'JavaScript', 'Python', 'PHP', 'C++', 'Erlang', 'Haskell']\n >>> selected = pick(options, title, multi_select=True, min_selection_count=1)\n >>> print selected\n\n**outputs**\n\n >>> [('Java', 0), ('C++', 4)]\n\n\n#### Options\n\n* `options`: a list of options to choose from\n* `title`: (optional) a title above options list\n* `indicator`: (optional) custom the selection indicator, defaults to *\n* `default_index`: (optional) set this if the default selected option is not the first one\n* `multi_select`: (optional), if set to True its possible to select multiple items by hitting SPACE\n* `min_selection_count`: (optional) for multi select feature to dictate a minimum of selected items before continuing\n* `options_map_func`: (optional) a mapping function to pass each option through before displaying\n\n#### Register custom handlers\n\nsometimes you may need to register custom handlers for specific keyboard keys, you can use the `register_custom_handler` API:\n\n >>> from pick import Picker\n >>> title, options = 'Title', ['Option1', 'Option2']\n >>> picker = Picker(options, title)\n >>> def go_back(picker):\n ... return None, -1\n >>> picker.register_custom_handler(ord('h'), go_back)\n >>> option, index = picker.start()\n\n* the custom handler will be called with the `picker` instance as it's parameter.\n* the custom handler should either return a two element tuple, or None.\n* if None is returned, the picker would continue to run, otherwise the picker will stop and return the tuple.\n\n#### Options Map Function\n\nIf your options are not in a format that you want displayed (such as a dictionary), you can pass in a mapping function which each option will be run through. The return value of the function will be displayed.\n\n* the selected option returned will be the original value and not the displayed return result from the `options_map_func` function.\n\n**pick** options map function example:\n\n >>> from pick import pick\n\n >>> title = 'Please choose an option: '\n >>> options = [{'label': 'option1'}, {'label': 'option2'}, {'label': 'option3'}]\n\n >>> def get_label(option): return option.get('label')\n\n >>> selected = pick(options, title, indicator='*', options_map_func=get_label)\n >>> print selected\n\n**displays**\n\n Please choose an option:\n\n * option1\n option2\n option3\n\n**outputs**\n\n >>> ({ 'label': 'option1' }, 0)\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/wong2/pick", "keywords": "terminal gui", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pick", "package_url": "https://pypi.org/project/pick/", "platform": "", "project_url": "https://pypi.org/project/pick/", "project_urls": { "Homepage": "https://github.com/wong2/pick" }, "release_url": "https://pypi.org/project/pick/0.6.4/", "requires_dist": null, "requires_python": "", "summary": "pick an option in the terminal with a simple GUI", "version": "0.6.4" }, "last_serial": 3772782, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "464623845dcf60d749cc1ed9b4fe5374", "sha256": "d3aa934030facbbbd46aa993406325b72c71a213634d8a918078119fd21a01b8" }, "downloads": -1, "filename": "pick-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "464623845dcf60d749cc1ed9b4fe5374", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3084, "upload_time": "2016-01-15T10:05:45", "url": "https://files.pythonhosted.org/packages/ea/44/c7fb5f32fefdd384dd5c6b978dabd023e980bd35d528ba131e52f45dbd46/pick-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a5221cd0c2eb492b196c3e26780cc4df", "sha256": "c4a894e8f5b8537a10b0fa8b89664ddade89312ce8d8834645f165ff59f8ef47" }, "downloads": -1, "filename": "pick-0.1.0.tar.gz", "has_sig": false, "md5_digest": "a5221cd0c2eb492b196c3e26780cc4df", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2486, "upload_time": "2016-01-15T10:05:52", "url": "https://files.pythonhosted.org/packages/21/a9/3c501eebc3476ab8618f73530f378647500604cd7c878d7902b31632118c/pick-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "ae2addbdd6df8fe9ea3e2424a3a3e435", "sha256": "7aea2c77a35020e2a66dc1a81a69687a5bf5f64aa62326991ba6bd2d1a35221d" }, "downloads": -1, "filename": "pick-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ae2addbdd6df8fe9ea3e2424a3a3e435", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3010, "upload_time": "2016-01-17T04:26:49", "url": "https://files.pythonhosted.org/packages/d5/97/6abad759721c2945769354d9ccf7cc9fba2f952e0d794d26bf0d7390b358/pick-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a415160796b2d613dc9fff066574b4f9", "sha256": "641e4390a7e11aee1a80eabf3425466d66eb3bd8a2909c987cee14f1f4ac291d" }, "downloads": -1, "filename": "pick-0.2.0.tar.gz", "has_sig": false, "md5_digest": "a415160796b2d613dc9fff066574b4f9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2360, "upload_time": "2016-01-17T04:27:09", "url": "https://files.pythonhosted.org/packages/85/d6/82712764849074fc3aa5461899dc5e1167685f6d99218228ad91c76ce984/pick-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "17cd33d10f403fee75128641ecf5c0c3", "sha256": "aa72809593a1cf4bd84a56187bae4033ac514c8c458d056dda9d9481d7c0d041" }, "downloads": -1, "filename": "pick-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "17cd33d10f403fee75128641ecf5c0c3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3028, "upload_time": "2016-01-17T08:28:54", "url": "https://files.pythonhosted.org/packages/6f/14/8764ac797c62418fd71777d9d2437c3c12bd18ae4437dc38edc3268af7c4/pick-0.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "36aa6b06df67bf66cef32d53883db96b", "sha256": "87b97f15a271f9e1fa23741d50c0be8bcd90e166563f02a6ef1cd3217c664e1c" }, "downloads": -1, "filename": "pick-0.3.0.tar.gz", "has_sig": false, "md5_digest": "36aa6b06df67bf66cef32d53883db96b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2384, "upload_time": "2016-01-17T08:28:59", "url": "https://files.pythonhosted.org/packages/e1/78/9a0f44e11d33204a87d0fce5e629f35b005fe88d3259ebfafd9242799999/pick-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "d4b69b344eaccef293ced684ea4d5d99", "sha256": "eef571ee50827b534e5bc6dd8ae80a934520c1b881370143347343d8feb0265a" }, "downloads": -1, "filename": "pick-0.3.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d4b69b344eaccef293ced684ea4d5d99", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4177, "upload_time": "2016-01-18T15:09:55", "url": "https://files.pythonhosted.org/packages/6d/f7/633dcdc38a65fbf9845f27e273f389cdb8c23ac44d22eed562868a8db2a8/pick-0.3.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d2992e1bece8c446c900c9fdf18aa23e", "sha256": "9686bc9b151306bfd675525b85e46744abe3289992121aea1cf9a3cf547c423b" }, "downloads": -1, "filename": "pick-0.3.1.tar.gz", "has_sig": false, "md5_digest": "d2992e1bece8c446c900c9fdf18aa23e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3306, "upload_time": "2016-01-18T15:10:13", "url": "https://files.pythonhosted.org/packages/9c/4c/6eda082d2b8a3e910fdc23865e9a6f72e8689f9db372812d6efad10ac718/pick-0.3.1.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "7dc359d7c3a67d07f0693b2f4a098ea5", "sha256": "2b611cccc45055e66e8db3a1a9763182c23c33e328727fe8576f31e3968794d2" }, "downloads": -1, "filename": "pick-0.4.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7dc359d7c3a67d07f0693b2f4a098ea5", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4581, "upload_time": "2016-01-20T08:44:36", "url": "https://files.pythonhosted.org/packages/64/c1/1c46251c724a1735845cd71321f4da8b783b8b938595bee4a17f43201077/pick-0.4.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f7bee518d1c0306c9e2aef2d6d36576e", "sha256": "4508a5055043848f4ad0b0b40bf09805ae865a71e6ca68b6a70075110d03b4e2" }, "downloads": -1, "filename": "pick-0.4.0.tar.gz", "has_sig": false, "md5_digest": "f7bee518d1c0306c9e2aef2d6d36576e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3660, "upload_time": "2016-01-20T08:44:46", "url": "https://files.pythonhosted.org/packages/ef/97/d312157b27097aea8ae9bbbad0b4a71e7ec83fd7585b479b17127a9d717a/pick-0.4.0.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "8cdace2d3776098178505e69112b4387", "sha256": "9ae8bb5ca083916b5cbdaf03a1f05cb757bd66691ccc4edae2076f4e51c837d8" }, "downloads": -1, "filename": "pick-0.5.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8cdace2d3776098178505e69112b4387", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4593, "upload_time": "2016-02-22T04:19:14", "url": "https://files.pythonhosted.org/packages/43/e2/474feddee6a83c62b7689f59fd991d433d8827375e2403ded0482c312641/pick-0.5.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b70457bf4c5a157349d3d48f3b7246c9", "sha256": "92cb060e6dfcb4a3edd6a1493da615db49fd875f2cd29e3e877bc6507f587585" }, "downloads": -1, "filename": "pick-0.5.0.tar.gz", "has_sig": false, "md5_digest": "b70457bf4c5a157349d3d48f3b7246c9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3679, "upload_time": "2016-02-22T04:19:19", "url": "https://files.pythonhosted.org/packages/bb/80/7194032ec0a398f7cd7a10935b0d404d54ed2dd4d931cd268c12d5da100c/pick-0.5.0.tar.gz" } ], "0.6.0": [ { "comment_text": "", "digests": { "md5": "1d57c5d246c57ed93465ed5af6912e26", "sha256": "875a5ad4c4738750142950466fdd2e57bf9dc32160ccf53a7f965cae4bc8759a" }, "downloads": -1, "filename": "pick-0.6.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "1d57c5d246c57ed93465ed5af6912e26", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5005, "upload_time": "2016-04-20T03:05:51", "url": "https://files.pythonhosted.org/packages/f4/f9/be1e6d67f05148cf08571a8b3fabffb2afcb093fdce78ba9a2e26ba1a293/pick-0.6.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b790e9c60bde0544c445ebe3f40411b2", "sha256": "90f380faea50c1b90b4a2033208dcd13b09714590c05657c9c55ea1f79c0acd0" }, "downloads": -1, "filename": "pick-0.6.0.tar.gz", "has_sig": false, "md5_digest": "b790e9c60bde0544c445ebe3f40411b2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3971, "upload_time": "2016-04-20T03:08:19", "url": "https://files.pythonhosted.org/packages/73/12/5a87a2b2de631e52c9dd27412261d2bd526608e1fa4925522f8d0f7392b3/pick-0.6.0.tar.gz" } ], "0.6.1": [ { "comment_text": "", "digests": { "md5": "eacc010e793c9cec441818bd26e42c24", "sha256": "9e45d91b81f479625a9a4a9d1b7e2a042a389fb5c1eee5b378e07f5cface17f9" }, "downloads": -1, "filename": "pick-0.6.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "eacc010e793c9cec441818bd26e42c24", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5007, "upload_time": "2016-05-24T04:32:06", "url": "https://files.pythonhosted.org/packages/be/df/bddef6a86ed180c17ca8c78d17b949038569f6c53ff607caae4a57780580/pick-0.6.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "13a3e4632c27c41bfc09e20528643d6e", "sha256": "0b94a088f77c5fd8e4d29e56bd0fc8dd32b655267d6a3687e06995c623986f03" }, "downloads": -1, "filename": "pick-0.6.1.tar.gz", "has_sig": false, "md5_digest": "13a3e4632c27c41bfc09e20528643d6e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3979, "upload_time": "2016-05-24T04:32:14", "url": "https://files.pythonhosted.org/packages/dd/7c/abb170c9237551fef22c4a63e92aafb4c51487e360597352d1cfd4364438/pick-0.6.1.tar.gz" } ], "0.6.2": [ { "comment_text": "", "digests": { "md5": "943253dfcedb5b5304311dfade84ad68", "sha256": "8b845b672f3dc7ea36c52540e6d6d86e3c7d6516137276e99037a93bb557f726" }, "downloads": -1, "filename": "pick-0.6.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "943253dfcedb5b5304311dfade84ad68", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5738, "upload_time": "2017-03-02T08:49:21", "url": "https://files.pythonhosted.org/packages/42/8a/986d57d73872b1782568a907226fbf81165427270e259fcbbc2b7bed8ddb/pick-0.6.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f87d317d9375ff7a6f3f18d83387d353", "sha256": "13155348650102a8334e77938d7d8177e691f118dc032a107dce2c9747271609" }, "downloads": -1, "filename": "pick-0.6.2.tar.gz", "has_sig": false, "md5_digest": "f87d317d9375ff7a6f3f18d83387d353", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4497, "upload_time": "2017-03-02T08:49:25", "url": "https://files.pythonhosted.org/packages/de/a1/0c074d6747d0d2d10aee26d6700a270968c136123f677d32096e8c40fc17/pick-0.6.2.tar.gz" } ], "0.6.3": [ { "comment_text": "", "digests": { "md5": "595435a9782b7297d084f8c28d4d76b0", "sha256": "d3b2385eed5b89b6387f6353663631fa53c8a9577a26eaa7dbe2df8bc1cc8fb6" }, "downloads": -1, "filename": "pick-0.6.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "595435a9782b7297d084f8c28d4d76b0", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5935, "upload_time": "2017-03-19T15:45:12", "url": "https://files.pythonhosted.org/packages/2a/73/9caa6235f668b32213b21ea95c839da53008d709ed94b91505fe83d4233f/pick-0.6.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5d7d36388f0d277940869d1152e42489", "sha256": "176ca8bfb3f0601281e88f85eb28a8d1c0c2ad76f1a554ffbe939eee593ec9aa" }, "downloads": -1, "filename": "pick-0.6.3.tar.gz", "has_sig": false, "md5_digest": "5d7d36388f0d277940869d1152e42489", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4656, "upload_time": "2017-03-19T15:45:14", "url": "https://files.pythonhosted.org/packages/10/56/5673bc0c9e768b78bee16ed4534938bd72a0cc8ca0510dab8b303d70b577/pick-0.6.3.tar.gz" } ], "0.6.4": [ { "comment_text": "", "digests": { "md5": "ff307ae3b0cdcfb57d74be25792bda5f", "sha256": "dd72cf851cc8918d288fbfb8ae933d9063b2841d882acc52b2f3bd74fded4ff1" }, "downloads": -1, "filename": "pick-0.6.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ff307ae3b0cdcfb57d74be25792bda5f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6904, "upload_time": "2018-04-17T11:21:01", "url": "https://files.pythonhosted.org/packages/89/64/5a96597ea238d5af113fdeb380f2e83f70b1163e4b67eb577abf20874b35/pick-0.6.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "70c4e43961988c7bb4fb77b940bcd38a", "sha256": "7e14aca88c256160a37d98ce987b74545eccb5ab97710aa1f5bb215f650e4c43" }, "downloads": -1, "filename": "pick-0.6.4.tar.gz", "has_sig": false, "md5_digest": "70c4e43961988c7bb4fb77b940bcd38a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5262, "upload_time": "2018-04-17T11:21:03", "url": "https://files.pythonhosted.org/packages/27/88/96d1eb32de7bdc680b1dd4024dddd6aea2ec0ab7af3a477f434a463f5ba7/pick-0.6.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ff307ae3b0cdcfb57d74be25792bda5f", "sha256": "dd72cf851cc8918d288fbfb8ae933d9063b2841d882acc52b2f3bd74fded4ff1" }, "downloads": -1, "filename": "pick-0.6.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ff307ae3b0cdcfb57d74be25792bda5f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6904, "upload_time": "2018-04-17T11:21:01", "url": "https://files.pythonhosted.org/packages/89/64/5a96597ea238d5af113fdeb380f2e83f70b1163e4b67eb577abf20874b35/pick-0.6.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "70c4e43961988c7bb4fb77b940bcd38a", "sha256": "7e14aca88c256160a37d98ce987b74545eccb5ab97710aa1f5bb215f650e4c43" }, "downloads": -1, "filename": "pick-0.6.4.tar.gz", "has_sig": false, "md5_digest": "70c4e43961988c7bb4fb77b940bcd38a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5262, "upload_time": "2018-04-17T11:21:03", "url": "https://files.pythonhosted.org/packages/27/88/96d1eb32de7bdc680b1dd4024dddd6aea2ec0ab7af3a477f434a463f5ba7/pick-0.6.4.tar.gz" } ] }