[Reality] Python question--parsing
Glyph Lefkowitz
glyph@twistedmatrix.com
Sat, 18 Mar 2000 13:02:47 -0500 (EST)
On Sat, 18 Mar 2000, Michael Dartt wrote:
> I'd really like to be able to use parse.py's Tokenizer to parse a given
> text string. The problem, of course, is that it calls tokenize(), which
> wants a readline()-type argument. Is there any function I can use that
> will allow me to do this?
twisted/words/sentence.py:16/17 should answer this question
(Try to ignore the nasty hack there that makes strings that end with an
EOF be valid...)
______ __ __ _____ _ _
| ____ | \_/ |_____] |_____|
|_____| |_____ | | | |
@ t w i s t e d m a t r i x . c o m
http://www.twistedmatrix.com/~glyph/