Skip to main content

Questions tagged [argparse]

-3 votes
2 answers
5k views

I mention python's argparse as an example but this would apply to any CLI argument parser library for any language. Just generally speaking, at a high level, if there are a lot of optional arguments ...
notacorn's user avatar
  • 109
-2 votes
1 answer
76 views

In my code let's say I have a function which does most of the work: def compute(x=3, y=5): ... And I have a CLI wrapper program using argparse. I intend end users to use the CLI program and not ...
qwr's user avatar
  • 332
1 vote
1 answer
114 views

I have a program which may accept several dozen arguments. I am questioning whether there is value in testing every possible argument. (In the examples, I don't have the exact syntax for pytest ...
user avatar
-3 votes
1 answer
178 views

I have function that has three parameters, called key, value and attribute. Parameter attribute may be empty or have within two arguments. Code of function below is shortened (deprived of arguments ...
Václav's user avatar
  • 151
5 votes
3 answers
3k views

I have a useful Python script that I've been invoking from the command line. It has decent number of options, maybe 20, and it's not unusual to run the script with six or seven flags. Then the rest of ...
kuzzooroo's user avatar
  • 615
5 votes
1 answer
4k views

Let's say that I want to enter info about multiple users from the command line AND that each user has multiple data associated with it. Is it possible (syntactically permissible) to use argparse to ...
Mawg's user avatar
  • 4,308