In article ,
loial wrote:
>
>A shell script is passing parameters to my python script in the
>following format
>
>-PARAM1 12345 -PARAM2 67890
>
>Can I parse these with optparse ? If so how?
You might try using shlex instead.
--
Aahz (a...@pythoncraft.com) <*> http://www.pytho
> loial (L) wrote:
>L> A shell script is passing parameters to my python script in the
>L> following format
>L> -PARAM1 12345 -PARAM2 67890
>L> Can I parse these with optparse ? If so how?
>L> I can't seem to get it to work. It seems to expect --PARAM1 and --
>L> PARAM2
See the doc:
Som
loial wrote:
> A shell script is passing parameters to my python script in the
> following format
>
> -PARAM1 12345 -PARAM2 67890
>
> Can I parse these with optparse ? If so how?
>
> I can't seem to get it to work. It seems to expect --PARAM1 and --
> PARAM2
You are out of luck. Quoting
http