search term parsing like Google/Gmail

Daniel Fetchinson fetchinson at googlemail.com
Wed Sep 9 19:43:20 EDT 2009


> I am looking for a string parser that works kind of like Google's or
> Gmail's advanced search capabilities.  So it would turn something like this:
>
>     (subject:"hi there" from:[tim, tom, -fred]) or (subject:foobar from:sam)
>
> into a python structure that could be used.  I don't really care so much
> about the search syntax except that easy and intuitive is best for
> users.  Does something like this exist?

You might want to look at pyparsing.

HTH,
Daniel


-- 
Psss, psss, put it down! - http://www.cafepress.com/putitdown



More information about the Python-list mailing list