I have an Alfred (Powerpack) workflow which I invoke by Alt+Space and then typing e.g. c f 2 -h
where the 2
is an always-present numeric value (that changes from invocation to invocation) and the -h
is a switch that might not be present.
This invokes some Python which expects to see at least the first of these two parms, if not both.
What is the best way to parse command line parameters in Alfred such that they can be passed to a Python script?