|
|
|
|
|
by aidos
4435 days ago
|
|
Maybe I'm misunderstanding but you could do: Usage:
script.py --option=<name>...
script.py --option spam --option eggs
{
"--option": [
"spam",
"eggs"
]
}
Example here [0].I haven't pushed it too far so I'm sure there are other cases where you'd need to create a different command line api to have it work (that may or may not be an issue depending on your use case). Regarding the other criticism, seems valid. In the docopt api can you have it do the parsing for you so you can edit the rules afterwards before you run them? [0] http://try.docopt.org/?doc=Usage%3A%0D%0A++script.py+--optio... |
|