Re: optparse option prefix

2007-04-04 Thread Steven Bethard
Mathias Waack wrote: > We've integrated python into a legacy application. Everything works fine (of > course because its python;). There's only one small problem: the > application reads the commandline and consumes all arguments prefixed with > a '-' sign. Thus its not possible to call a python mo

Re: optparse option prefix

2007-04-04 Thread Mathias Waack
Diez B. Roggisch wrote: >> (3) Create a filter module that reads sys.argv, replaces leading "+" >> signs with "-" signs, and then stuffs it back into sys.argv before >> optparse gets to see it. > > That's not even necessary, the optparser will work on a passed argument > list. No need to alter sys

Re: optparse option prefix

2007-04-04 Thread Diez B. Roggisch
> > (3) Create a filter module that reads sys.argv, replaces leading "+" signs > with "-" signs, and then stuffs it back into sys.argv before optparse gets > to see it. That's not even necessary, the optparser will work on a passed argument list. No need to alter sys.argv. Diez -- http://mail.p

Re: optparse option prefix

2007-04-04 Thread Steven D'Aprano
On Wed, 04 Apr 2007 08:52:48 +, Mathias Waack wrote: > We've integrated python into a legacy application. Everything works fine (of > course because its python;). There's only one small problem: the > application reads the commandline and consumes all arguments prefixed with > a '-' sign. Thus

optparse option prefix

2007-04-04 Thread Mathias Waack
We've integrated python into a legacy application. Everything works fine (of course because its python;). There's only one small problem: the application reads the commandline and consumes all arguments prefixed with a '-' sign. Thus its not possible to call a python module from the commandline wit