A Python library for easily getting user input form multiple items in a list, emulating the Bash(1) builtin select.
Project description
pyselect
A Python library for easily getting user input form multiple items in a list, emulating the Bash(1) builtin select.
Usage
Pyselect wraps raw_input, more or less:
In [1]: import pyselect In [2]: pyselect.select(['apples', 'oranges', 'bananas']) 1) apples 2) oranges 3) bananas #? 2 Out[2]: 'oranges'
But can also be used as a Python module, when scripting:
$ python -m pyselect $(ls) 1) LICENSE.txt 2) build/ 3) dist/ 4) pyselect.egg-info/ 5) pyselect.py 6) pyselect.pyc 7) setup.py 8) test.py #? 4 pyselect.egg-info/
Or in a Bash pipe:
$ ls | xargs python -m pyselect 1) LICENSE.txt 2) build/ 3) dist/ 4) pyselect.egg-info/ 5) pyselect.py 6) pyselect.pyc 7) setup.py 8) test.py #? 5 pyselect.py
Installation
Pyselect is available on Pypi:
$ pip install pyselect
License
MIT, see LICENSE.txt
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyselect-0.1.0.tar.gz
(3.1 kB
view hashes)
Built Distribution
Close
Hashes for pyselect-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54d1cca0c0aac2cdba6e41e9e59682d33ab4223817f1ce2c2278de609692e1f9 |
|
MD5 | c64e0f0b93bfc6ce3e95fba42885229f |
|
BLAKE2b-256 | 6ed0ed92fc5a0297bd3b3d8a7ef7f6afa525632f374246cf21436659c9bbee4e |