bchao1 / bullet

🚅 Interactive prompts made simple. Build a prompt like stacking blocks.
https://pypi.org/project/bullet/
MIT License
3.55k stars 113 forks source link

Allow to set a default value for YesNo #45

Closed hugoalvarado closed 5 years ago

hugoalvarado commented 5 years ago

Allow to set a default value for the YesNo prompt. Pressing enter will use the pre-defined default which is displayed in square brackets after the prompt question.

Ie:

Screen Shot 2019-05-04 at 10 31 15 PM

Usage:

YesNo("Are you a good student? ",
            default = 'y',
            word_color = colors.foreground["yellow"]),