-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Milestone
Description
Hello,
it is said in the documentation that getchar function always returns unicode there, but when i tried to use the code snippet of the documentation on my windows 10 machine, i always fell on "invalid input :("
I inspected the type of value returned and I realized that it was bytes. So either you have to change the documentation and the code like this:
click.echo('Continue? [yn] ', nl=False)
c = click.getchar()
if c == b'y':
click.echo('We will go on')
elif c == b'n':
click.echo('Abort!')
else:
click.echo('Invalid input :(')
either the problem have to be solved..
I'm using click 6.7, python 3.6 and I'm working under windows 10.
Metadata
Metadata
Assignees
Labels
No labels