I've got a program with a large number of potential args.
It basically allows the user to get/set/delete/list any table in a very small database. Each column has a arg that can be passed.
This isn't the main interface, just an occasionally useful admin interface.
Anyhow, if the user wants to insert a row into a table he has to know the name of all the columns. While it's easy to see that from the help - it's also a pain in the butt.
So, I've changed the code so the user can pass a --prompt option and the program will prompt them for every column name associated with the table they specified. But my problem is that I now need to duplicate my input constraints (choices, types, etc) in two places - argparse and this prompting function.
- Question #1: is there a better way of doing this?
- Question #2: is there a clean way to reference argparse constraints for this purpose?
- Question #3: are there any libraries recommended as alternatives that combine command line args, options and prompting?
Thanks