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 parse something like myprpgrm.py --user john --email john@doe.com --valid Y --user jane --email jane@doe.com --valid N
?
As you can see, each user should have 3 parameters associated with it - a name, an email and a valid flag.
Can argparse
make sure that if a user parameter is seen, it must be accompanied by an email parameter and a validity parameter?
And can it give me the grouped information when I add multiple users, each with 3 parameters?
[Update] Could this be achieved somehow with Argument Groups?