Parser or regex ?

Tim Arnold tiarno at sas.com
Fri Dec 16 10:21:34 EST 2005


"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.

http://pyparsing.sourceforge.net/


--Tim 





More information about the Python-list mailing list