> On 2010-11-09, Jean-Michel Pichavant <(E-Mail Removed)> wrote:
>> One pythonic way to do it, is to use an option parser.
> That seems like massive overkill -- I don't care about any of the other
> options. It seems like it'd result in doing more work to get and then
> extract the options, and most of that would be discarded instnatly.
I've always used an extended version of getopt() in C. I was so surprised
to see that there's nothing equivalent in Java that I wrote my own and
was consequently was very pleased to find that Python already has the
optparse module. Using it is a no-brainer, particularly as it makes quite
a good fist of being self-documenting and of spitting out a nicely
formatted chunk of help text when asked to do so.
martin@ | Martin Gregorie
gregorie. | Essex, UK
On 11/8/10 8:13 PM, Seebs wrote:
> On 2010-11-09, Ben Finney<(E-Mail Removed)> wrote:
>> Seebs<(E-Mail Removed)> writes:
>>> I think we're stuck with backwards compatibility at least as far as
>> Then you don't yet have the ???any??? and ???all??? built-in functions, or the
>> tuple-of-prefixes feature of ???str.startswith??? either. Bummer.
>> At which point, the Pythonic thing to do is to convince your
>> organisation to use a version of Python that's at least officially
>> supported by the PSF
> Unfortunately, we're selling something to people who will explode if
> we tell them to upgrade their RHEL4 systems, so we have to work on those.
> (There is some tiny hope that we'll be able to move the baseline to RHEL5
> within another two years.)
When we deal with such people, we also sell them a recent Python interpreter.
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco