prompt-toolkit / python-prompt-toolkit

Library for building powerful interactive command line applications in Python
https://python-prompt-toolkit.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
9.11k stars 717 forks source link

Example checkbox_dialog.py doesn't work #959

Open papi-tokei opened 4 years ago

papi-tokei commented 4 years ago

Hello. I use it conveniently. Report problems found during use.

Execution environment

OS: Mac OS Mojave 10.14.6 Python(pyenv): 3.7.4 prompt-toolkit: 2.0.9

Reproduction procedure and error log

The sample in example does not work. Specifically, when "checkbox_dialog.py" is executed like the following command, an error occurs, The program is not executed (GUI is not displayed and the program ends with an error).

$ pip install prompt_toolkit

$ git clone https://github.com/prompt-toolkit/python-prompt-toolkit.git
$ cd /python-prompt-toolkit/examples/dialogs
$ python checkbox_dialog.py
Traceback (most recent call last):
  File "checkbox_dialog.py", line 7, in <module>
    from prompt_toolkit.shortcuts import checkboxlist_dialog, message_dialog
ImportError: cannot import name 'checkboxlist_dialog' from 'prompt_toolkit.shortcuts' (/Users/xxxx/.pyenv/versions/3.7.4/lib/python3.7/site-packages/prompt_toolkit/shortcuts/__init__.py)

Thanks.

rroblik commented 4 years ago

+1