You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the humanfriendly.prompts.prompt_for_confirmation() function on Windows fails with a ModuleNotFoundError for 'readline'.
Python: 3.6.0 64-bit
Humanfriendly: 4.4.1 (Installed from PyPI using pip)
cmd>python
Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import humanfriendly.prompts
>>> humanfriendly.prompts.prompt_for_confirmation("Testing...", default=False)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Program Files\Python36\lib\site-packages\humanfriendly\prompts.py", line 86, in prompt_for_confirmation
reply = prompt_for_input(prompt_text, '', padding=padding, strip=True)
File "C:\Program Files\Python36\lib\site-packages\humanfriendly\prompts.py", line 245, in prompt_for_input
prepare_friendly_prompts()
File "C:\Program Files\Python36\lib\site-packages\humanfriendly\prompts.py", line 328, in prepare_friendly_prompts
import readline # NOQA
ModuleNotFoundError: No module named 'readline'
This is likely due to GNU readline not being available on Windows.
The application I'm using humanfriendly with needs to work on Windows, so it would be nice if there was an option to disable readline usage when the import fails.
The text was updated successfully, but these errors were encountered:
Thanks @GhostofGoes for the clear bug report, @cheretbe for suggesting a fix and @GhostofGoes for implementing the fix! I've just merged pull request #20 and published release 4.4.2.
Using the humanfriendly.prompts.prompt_for_confirmation() function on Windows fails with a ModuleNotFoundError for 'readline'.
Python: 3.6.0 64-bit
Humanfriendly: 4.4.1 (Installed from PyPI using pip)
This is likely due to GNU readline not being available on Windows.
The application I'm using humanfriendly with needs to work on Windows, so it would be nice if there was an option to disable readline usage when the import fails.
The text was updated successfully, but these errors were encountered: