Parser or regex ?

Fuzzyman fuzzyman at gmail.com
Fri Dec 16 10:43:50 EST 2005


Tim Arnold wrote:
> "Fuzzyman" <fuzzyman at gmail.com> wrote in message
> news:1134743933.931635.77490 at f14g2000cwb.googlegroups.com...
> > Hello all,
> >
> > I'm writing a module that takes user input as strings and (effectively)
> > translates them to function calls with arguments and keyword
> > arguments.to pass a list I use a sort of 'list constructor' - so the
> > syntax looks a bit like :
> >
> >   checkname(arg1, "arg 2", 'arg 3', keywarg="value",
> > keywarg2='value2', default=list("val1", 'val2'))
> >
> > Worst case anyway :-)
> >
>
> pyparsing is great, easy to configure and very powerful--I think it looks
> like a great tool for your inputs.
>

Thanks - I considered it. It's actually quite a small module (about
38k). I don't want to introduce a dependency on an external module.

All the best,

Fuzzyman
http://www.voidspace.org.uk/python/index.shtml

> http://pyparsing.sourceforge.net/
> 
> 
> --Tim




More information about the Python-list mailing list