Re: getopt: Make argument mandatory

2004-12-16 Thread Kent Johnson
Frans Englich wrote: On Wednesday 15 December 2004 14:07, Diez B. Roggisch wrote: In my use of getopt.getopt, I would like to make a certain parameter mandatory. I know how to specify such that a parameter must have a value if it's specified, but I also want to make the parameter itself mandatory(c

Re: getopt: Make argument mandatory

2004-12-16 Thread Frans Englich
On Wednesday 15 December 2004 14:07, Diez B. Roggisch wrote: > > In my use of getopt.getopt, I would like to make a certain parameter > > mandatory. I know how to specify such that a parameter must have a value > > if it's specified, but I also want to make the parameter itself > > mandatory(combin

Re: getopt: Make argument mandatory

2004-12-15 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Frans Englich wrote: >> > In my use of getopt.getopt, I would like to make a certain parameter >> > mandatory. >> >> Isn't a *mandatory option* a contradiction? Why don't you turn it into an >> argument? You already called it argument in the subject of your post. > > I p

Re: getopt: Make argument mandatory

2004-12-15 Thread Frans Englich
On Wednesday 15 December 2004 20:12, Marc 'BlackJack' Rintsch wrote: > In <[EMAIL PROTECTED]>, Frans Englich > > wrote: > > Hello, > > > > In my use of getopt.getopt, I would like to make a certain parameter > > mandatory. > > Isn't a *mandatory option* a contradiction? Why don't you turn it into

Re: getopt: Make argument mandatory

2004-12-15 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Frans Englich wrote: > > Hello, > > In my use of getopt.getopt, I would like to make a certain parameter > mandatory. Isn't a *mandatory option* a contradiction? Why don't you turn it into an argument? You already called it argument in the subject of your post. Ciao,

Re: getopt: Make argument mandatory

2004-12-15 Thread Diez B. Roggisch
> In my use of getopt.getopt, I would like to make a certain parameter > mandatory. I know how to specify such that a parameter must have a value > if it's specified, but I also want to make the parameter itself > mandatory(combined with a mandatory value, the result is that the user > must specify

Re: getopt: Make argument mandatory

2004-12-15 Thread Fredrik Lundh
Frans Englich wrote: > In my use of getopt.getopt, I would like to make a certain parameter > mandatory. but you just did: >if configurationFile == "": >print "You must pass an URL/path to a configuration file, see > --help." >sys.exit(common.exitCodes["parameter"