One of the last features to reimplement depends on the EOFilter class.
EOFilter is sort of like a pre-cursor of LINQ. I have give it a
collection of objects [really, just about anything] and a query *string*
and it returns the objects that match the described criteria. Anyone
know of something like this in Pythong?
An EOFilter string might look like: "objectId == 10100 OR objectId ==
10003 OR objectId == 10005" and it would return all the objects in the
collection that have an attribute/property named "objectId" that has a
value of 10100, 10003, or 10005. A bit odd, but actually pretty handy.
--
Adam Tauno Williams <awil...@whitemice.org> LPIC-1, Novell CLA
<http://www.whitemiceconsulting.com>
OpenGroupware, Cyrus IMAPd, Postfix, OpenLDAP, Samba
If the grammar of this string is really this simple, I'd just split on
'OR' and then on '==' and put it through some loops. Or, if the input
is more complex but internal-only, you could just eval() it.
Otherwise I'm guessing you probably will have to write a parser for this
mini-language. I haven't used it, but the internets point at
http://pyparsing.wikispaces.com/
--
Dave Brondsema : da...@brondsema.net
http://www.brondsema.net : personal
http://www.splike.com : programming
<><