[Biopython-dev] Bio.Application interface

Peter biopython at maubp.freeserve.co.uk
Sun Apr 26 10:58:29 UTC 2009


On Fri, Apr 24, 2009 at 5:59 PM, Peter <biopython at maubp.freeserve.co.uk> wrote:
> On Fri, Apr 24, 2009 at 4:31 PM, Cymon Cox <cy at cymon.org> wrote:
>> Rather than add another variation on _Option, or alter _OptionAlt to cover
>> "-param=value", and as we only have a few command line interfaces at
>> present, I'd like to suggest the following simplification to _Option:
>> ...
>> ie. add an equate flag
>
> That looks very sensible.  If there are no counter suggestions, I
> think that could be checked in :)

The equate argument is now in CVS.

One catch was that the old code used an equals on options starting
"--", e.g. "--apped=yes", but not on short options starting "-", e.g.
"-append yes" (a bit of magic based on the behaviour of typical Unix
tools?).  From a grep for "_Option", the only files concerned are:

AlignAce/Applications.py
Application/__init__.py
Blast/Applications.py
Emboss/Applications.py
Motif/Applications/AlignAce.py

And from looking at these, they all use options with a single leading
dash, so for backwards compatibility I set equate to False by default
(not True as in your outlined code).

Does this work for you Cymon?

Peter



More information about the Biopython-dev mailing list