>>>>> loial <[email protected]> (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:
Some other option syntaxes that the world has seen include:
[...]
* a hyphen followed by a whole word, e.g. "-file" [...]
These option syntaxes are not supported by optparse, and they never will be.
--
Piet van Oostrum <[email protected]>
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: [email protected]
--
http://mail.python.org/mailman/listinfo/python-list