Martel Package from Biopython

Paul McGuire ptmcg at austin.rr.com
Wed Apr 18 22:41:33 CEST 2007


On Apr 18, 12:28 pm, elventear <elvent... at gmail.com> wrote:
> Hello,
>
> I know this is not the best place to ask this but I haven't had luck
> in the Biopython forums with my questions, so I'll just try here.
>
> I want to use the Martel package to do some parsing. I've found it to
> be very powerful and convenient. Yet the documentation avaialble is
> less than complete. I have a few questions on how to use it, if you
> know the answers to my questions:
>
> - How does Bio.Std.record  affect the parsing of a Martel expression.
> - How does Bio.RecordReader work? How does it interact with
> Martel.HeaderFooter?
> - Many of the matching objects (ie. Martel.Digits) have an attrs
> argument. How does it work?
>
> Thanks!

Andrew Dalke says in his blog that he finds pyparsing to be similar in
concept to Martel.  I looked over the Martel presentations at his web
site, and I can see some similarities, but pyparsing has some of its
own peculiarities, too.  So if Martel remains a mystery, you could
give pyparsing a shot.  Pyparsing tries to make parser-writing a less
painful process, so it incorporates some conventions - most notably,
pyparsing assumes that whitespace is significant for the purposes of
word boundaries and such, but you grammar does not need to explicitly
spell out where whitespace would go.  Or try one of these other
parsing packages on Ned Batchelder's web page:
http://nedbatchelder.com/text/python-parsers.html.

-- Paul




More information about the Python-list mailing list