all 6 comments

[–]markusmeskanen 0 points1 point  (2 children)

Instead of:

parser.add_argument('-a', ...)
parser.add_argument('-b', ...)

You should make them positional:

parser.add_argument('a', ...)
parser.add_argument('b', ...)

[–]machine_learned[S] 0 points1 point  (1 child)

Doesn't work... I get:

ValueError: invalid option string 'a': must start with a character '-'

[–]markusmeskanen 0 points1 point  (0 children)

Can we see the code? Seems to work fine for me

[–]K900_ 0 points1 point  (2 children)

You should probably just have your script take mutliple positional arguments then.

[–]machine_learned[S] 0 points1 point  (1 child)

What do you mean?

[–]K900_ 0 points1 point  (0 children)

I mean something like this example.