Forum Thread: Your Input on Input

Your Input on Input

I've recently been drafting up some scripts for future articles and I want to get some community insight. Usually in my scripts I ask the user for input, instead of using flags and switches. This usually isn't a problem since these scripts don't really need a lot of detail in order to function. But I've run into an issue where there is simply too many options to reasonably ask the user for input on all of them. Should I switch to using flags/switches, or should I just simplify the user input? I just wanted to get some community opinions before I made any decisions...


6 Responses

I'd use flags. They are easy to use, and the user can set the only the options they want, instead of answering all questions over and over.

I'd go for the flags as well. They make automation more straightforward. Having to type arguments interactively slows down the flow, IMHO.

I will use flags in your scenario. They are useful, and much more better than clarified input.

If there really are too many options to reasonably ask for input on all of them, I would go flags/switches. So long as a user can know what the default settings are, and can change things if they want to, seems reasonable.

I'd go for flags too - that way if you're running your program from within another script it's nice and easy.
On the off-chance that you're using Python, take a look at the ArgParse module - it's excellent.

It +1 for mentioning argparse

Share Your Thoughts

  • Hot
  • Active