Re: optparse: best way

2010-06-09 Thread Jean-Michel Pichavant
hiral wrote: On Jun 8, 3:03 pm, Jean-Michel Pichavant wrote: hiralwrote: Hi, I am using optparser to do following... Command syntax: myscript -o[exension] other_arguments where; extension can be 'exe', 'txt', 'pdf', 'ppt' etc. Now to parse this, I am doing fol

Re: optparse: best way

2010-06-09 Thread hiral
On Jun 8, 4:30 pm, Hrvoje Niksic wrote: > Thomas Jollans writes: > > UNIX and GNU recommendations. I've never actually heard of optparser, > > but I'd expect it to have the usual limitations: > > Hiralprobably meant to write "optparse", which supports GNU-style > options in a fairly standard and

Re: optparse: best way

2010-06-09 Thread hiral
On Jun 8, 3:03 pm, Jean-Michel Pichavant wrote: > hiralwrote: > > Hi, > > > I am using optparser to do following... > > > Command syntax: > > myscript -o[exension] other_arguments > >     where; extension can be 'exe', 'txt', 'pdf', 'ppt' etc. > > > Now to parse this, I am doing following... > > >

Re: optparse: best way

2010-06-08 Thread Hrvoje Niksic
Thomas Jollans writes: > UNIX and GNU recommendations. I've never actually heard of optparser, > but I'd expect it to have the usual limitations: Hiral probably meant to write "optparse", which supports GNU-style options in a fairly standard and straightforward way. Which includes that defining

Re: optparse: best way

2010-06-08 Thread Peter Otten
hiral wrote: > Hi, > > I am using optparser to do following... > > Command syntax: > myscript -o[exension] other_arguments > where; extension can be 'exe', 'txt', 'pdf', 'ppt' etc. > > > Now to parse this, I am doing following... > > parser.add_option("-oexe', dest=exe_file...) > parser.a

Re: optparse: best way

2010-06-08 Thread Michele Simionato
On Jun 8, 10:38 am, hiral wrote: > Hi, > > I am using optparser to do following... > > Command syntax: > myscript -o[exension] other_arguments >     where; extension can be 'exe', 'txt', 'pdf', 'ppt' etc. > > Now to parse this, I am doing following... > > parser.add_option("-oexe', dest=exe_file..

Re: optparse: best way

2010-06-08 Thread Ben Finney
hiral writes: > Command syntax: > myscript -o[exension] other_arguments > where; extension can be 'exe', 'txt', 'pdf', 'ppt' etc. It's more generally applicable to refer to that as a “suffix” for the filename, and specify the full suffix including the full-stop (‘.’) character. What your ex

Re: optparse: best way

2010-06-08 Thread Jean-Michel Pichavant
hiral wrote: Hi, I am using optparser to do following... Command syntax: myscript -o[exension] other_arguments where; extension can be 'exe', 'txt', 'pdf', 'ppt' etc. Now to parse this, I am doing following... parser.add_option("-oexe', dest=exe_file...) parser.add_option("-otxt', dest=t

Re: optparse: best way

2010-06-08 Thread Thomas Jollans
On 2010-06-08 10:38, hiral wrote: > Hi, > > I am using optparser to do following... > > Command syntax: > myscript -o[exension] other_arguments > where; extension can be 'exe', 'txt', 'pdf', 'ppt' etc. > > > Now to parse this, I am doing following... > > parser.add_option("-oexe', dest=exe_file

optparse: best way

2010-06-08 Thread hiral
Hi, I am using optparser to do following... Command syntax: myscript -o[exension] other_arguments where; extension can be 'exe', 'txt', 'pdf', 'ppt' etc. Now to parse this, I am doing following... parser.add_option("-oexe', dest=exe_file...) parser.add_option("-otxt', dest=txt_file...) par