Re: optparse: best way

2010-06-09 Thread hiral
On Jun 8, 3:03 pm, Jean-Michel Pichavant jeanmic...@sequans.com 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

Re: optparse: best way

2010-06-09 Thread hiral
On Jun 8, 4:30 pm, Hrvoje Niksic hnik...@xemacs.org wrote: Thomas Jollans tho...@jollans.com 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

Re: optparse: best way

2010-06-09 Thread Jean-Michel Pichavant
hiral wrote: On Jun 8, 3:03 pm, Jean-Michel Pichavant jeanmic...@sequans.com 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

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...)

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...)

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',

Re: optparse: best way

2010-06-08 Thread Ben Finney
hiral hiralsmaill...@gmail.com 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 (‘.’)

Re: optparse: best way

2010-06-08 Thread Michele Simionato
On Jun 8, 10:38 am, hiral hiralsmaill...@gmail.com 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',

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...)

Re: optparse: best way

2010-06-08 Thread Hrvoje Niksic
Thomas Jollans tho...@jollans.com 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