optparse
Ben Finney
bignose+hates-spam at benfinney.id.au
Wed Sep 27 00:44:00 EDT 2006
rick <rickzolun1 at charter.net> writes:
> usage: DelimTOFixedWidth.py <input filename> <output filename> [options]
That's not the command-line argument style that optparse models. It
should be:
command_name [options] <arg1> <arg2>
In other words, the options (optionally) appear before the non-option
arguments. This is the convention followed by most command-line tools,
and it's what users expect.
There are other command-line parser modules (e.g. argparse), perhaps
you can look to them for different functionality.
--
\ "If nature has made any one thing less susceptible than all |
`\ others of exclusive property, it is the action of the thinking |
_o__) power called an idea" -- Thomas Jefferson |
Ben Finney
More information about the Python-list
mailing list