from pyparsing import *
greet = commaSeparatedList
hello = "Hello, World!\nyes,me\nwhat,yes"
result = greet.parseString( hello )
print result
['Hello', 'World!']
If I wrap commaSeparatedList in OneOrMore it enters an infinite loop and I am not sure why. I would like to avoid going line by line and using commaSeparatedList.
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
from pyparsing import *
greet = commaSeparatedList
hello = "Hello, World!\nyes,me\nwhat,yes"
result = greet.parseString( hello )
print result
['Hello', 'World!']
If I wrap commaSeparatedList in OneOrMore it enters an infinite loop and
I am not sure why. I would like to avoid going line by line and using
commaSeparatedList.
commaSeparatedList will not work across newlines:
from pyparsing import *
greet = commaSeparatedList
hello = "Hello, World!\nyes,me\nwhat,yes"
result = greet.parseString( hello )
print result
If I wrap commaSeparatedList in OneOrMore it enters an infinite loop and I am not sure why. I would like to avoid going line by line and using commaSeparatedList.
Thanks
Sorry I can't help you, but if it helps Paul or anyone else, it works with
Python 3 (after changing the print to print(), of course).
On Fri, Mar 14, 2014 at 1:19 PM, Jim P jimppp3@users.sf.net wrote: