Code Monkey home page Code Monkey logo

selectmenu's Introduction

SelectMenu

forthebadge

demo

๐Ÿ“„ Overview

SelectMenu is the input form to choose from menu by arrow keys.

SelectMenu powered by python-prompt-toolkit.

โœ๏ธ Usage

>>> from selectmenu import SelectMenu
>>> menu = SelectMenu()
>>> menu.add_choices(
...    ["Python", "Ruby", "Javascript", "HTML", "CSS"])
>>> result = menu.select("What language do you like?")
What language do you like? (Use arrow keys)
 > Python
   Ruby
   Javascript
   HTML
   CSS
>>> print result
Python

๐Ÿ“ฅ Installation

$ git clone [email protected]:alice1017/SelectMenu.git
$ cd SelectMenu
$ python setup.py build install

or

$ pip install SelectMenu

๐Ÿ‘€ Contribution

  1. Forks on Github
  2. Find a bug? Send a pull request to get it merged and published.

selectmenu's People

Contributors

alice1017 avatar rickerp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

selectmenu's Issues

Emoji problem in README.rst

Installing package with pip on Windows threw error, same with compiling from source. I traced it and apparently UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f in position 315: character maps to <undefined> was caused by the unicode emojis in README.rst, so I deleted them and it compiled successfully.

pip install selectmenu
Collecting selectmenu
Using cached SelectMenu-1.0.0b2.tar.gz (3.4 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

ร— python setup.py egg_info did not run successfully.
โ”‚ exit code: 1
โ•ฐโ”€> [8 lines of output]
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "C:\Users\Ahmad\AppData\Local\Temp\pip-install-ga0xh4rq\selectmenu_3404e77b8e244ccaaf1055818cd07cef\setup.py", line 8, in
long_description = fp.read()
File "C:\Program Files\Python39\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f in position 315: character maps to
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

ร— Encountered error while generating package metadata.
โ•ฐโ”€> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

ImportError: cannot import name 'Token' from 'prompt_toolkit.token' (/usr/lib/python3/dist-packages/prompt_toolkit/token.py)

$ pip3 install SelectMenu
Collecting SelectMenu
  Using cached SelectMenu-1.0.0b2.tar.gz (3.4 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2e5v4gfb/SelectMenu/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2e5v4gfb/SelectMenu/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-2e5v4gfb/SelectMenu/pip-egg-info
         cwd: /tmp/pip-install-2e5v4gfb/SelectMenu/
    Complete output (9 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-2e5v4gfb/SelectMenu/setup.py", line 5, in <module>
        from selectmenu import __author__, __version__
      File "/tmp/pip-install-2e5v4gfb/SelectMenu/selectmenu/__init__.py", line 4, in <module>
        from selectmenu.core import SelectMenu
      File "/tmp/pip-install-2e5v4gfb/SelectMenu/selectmenu/core.py", line 6, in <module>
        from prompt_toolkit.token import Token
    ImportError: cannot import name 'Token' from 'prompt_toolkit.token' (/usr/lib/python3/dist-packages/prompt_toolkit/token.py)
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Install problems

Hi, The pip install dosent work, same with the
kรฉp
clone link, change it to this:
kรฉp

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.