I'm using argparse
to receive inputs from the command line to run my script.
My current input string looks like this:
path> python <\filename\\> -t T1 T2 T3 -f F1 F2
Is there a parameter in argparse such that instead of separating inputs by space, I can separate them by commas?
In other words:
path> python <\filename\\> -t T1,T2,T3 -f F1,F2
There is no such feature in argparse
.
Alternatives:
args
namespace and split/parse the values manuallyaction
and split/parse the values manuallytype
and split/parse the values manuallyArgumentParser
and customise ArgumentParser.convert_arg_line_to_args
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With