Hacker News new | ask | show | jobs
Python: Don't use input() – help your users (github.com)
3 points by tmbo 2055 days ago
1 comments

This looks good. I'd rather the `questionary.checkbox` produce a checkbox instead of radio button. This could be confusing, especially given the support for multiple selections, as radio buttons are most commonly mutually exclusive, and check boxes are usually not.

Can this parse arguments directly, produce help, etc. Like Click[0]? In other words, can this be "scripted".

Will keep an eye on this.

- [0]: https://click.palletsprojects.com/

> Can this parse arguments directly, produce help, etc. Like Click[0]? In other words, can this be "scripted".

This isn't possible just yet. I think it is a great idea to combine CLI argument parsing with queries if the arguments are missing, sounds like a thing you'd like to do instead of aborting a script because of a missing CLI argument.

Yes, Click supports defaults, choices, in options with help strings.
thanks a lot for the feedback - I am the author of the library.

> I'd rather the `questionary.checkbox` produce a checkbox instead of radio button.

As you said, it doesn't behave like a radio group though but like group of checkboxes (as it allows you to select multiple items). Do you mean that the default styling of using empty & filled circles to display selections is confusing?

>Do you mean that the default styling of using empty & filled circles to display selections is confusing?

Yes. Most of the time, radio buttons are mutually exclusive and you can only choose one. Check boxes on the other hand are, most of the time, cumulative.

i.e: if you want to signify you can select multiple items, you use check boxes. If you want to signify you can select only one item, you use a radio button.

I'm a simple person conditioned by years of this pattern, but I think you'd find the same sentiment if you search for "checkbox vs radio button".