> Great links, Danny. Thanks. I had seen mxTextTools before but didn't
> search for the right thing before raising the question. The pyparsing
> seems very interesting. The code that I attach below is a very
> light-weight version of a formatted reader. It assumes that you just
> want to pluck white-space delimited values out of lines in a text file
> (something I've had to do from time to time and something others have
> asked about on tutor before). Perhaps this is the sort of simple
> approach that evolves into one of the tools above as more complex
> parsing rules are needed.
Hi Chris,
Yes, I suspect that this happens a lot. I have my own little formatting
reader that simulates some of the features of C's scanf, for example:
http://hkn.eecs.berkeley.edu/~dyoo/python/scanf/
so I think it's one of those little exercises that everyone ends up doing
at least once. *grin*
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor