I have the following scenario for command line argument. If there is a particular option then there should be some other required options. For example if there is — create then there should be –name. Also if there is –remove then there should be –id. Is it possible to implement this scenario with argparse? or someother thing?
I have the following scenario for command line argument. If there is a particular
Share
This can be done with subcommands as long as you don’t mind
createandremovenot being preceded with hyphens. This may make sense anyway, since those verbs are often used as actions rather than options.