Wrapper to argparse to create command line interfaces in Python, with support for hierarchical commands that can be bound to modules or classes.
Questions tagged [python-argh]
2 questions
73
votes
2 answers
python argh/argparse: How can I pass a list as a command-line argument?
I'm trying to pass a list of arguments to a python script using the argh library. Something that can take inputs like these:
./my_script.py my-func --argA blah --argB 1 2 3 4
./my_script.py my-func --argA blah --argB 1
./my_script.py my-func --argA…

Abe
- 22,738
- 26
- 82
- 111
0
votes
2 answers
An easy way to set up abbreviations with argh
I'm using the argh library to create a python command line tool. Several of the names I'm using have turned out to be pretty long, e.g.:
./my_program.py download-and-parse-data --randomize-order --training-percent 80
Is there a simple way to allow…

Abe
- 22,738
- 26
- 82
- 111