[Pyparsing] setDefaultWhitespaceChars
Brought to you by:
ptmcg
From: <mmm...@gm...> - 2009-07-15 03:09:55
|
I am trying to make "\t" significant by passing a string that doesn't include "\t" to setDefaultWhitespaceChars. However, it still seems to recognize '\t' as a white space. >>> ParserElement.setDefaultWhitespaceChars("\n\r ") >>> words = Word(alphas) >>> sentence = OneOrMore(words) + '.' >>> print sentence.parseString("\tHello World.") ['Hello', 'World', '.'] How should I accomplish this? |