[Pyparsing] CSVs with trailing comma
Brought to you by:
ptmcg
From: Nathan H. <rat...@go...> - 2007-09-03 21:47:02
|
Hi, If I have a comma-separated list a,b, # notice the trailing comma how can I specify a grammar to ignore the trailing comma..... foo = delimitedList( Word(alphanums, delim=",") The only I could think off was foo + Optional(",").suppress(), which unfortunately doesnt work. Is there a way to this in pyparsing? Many Thanks in advance, Nathan |