Wednesday, October 24, 2007
The day after I hyped the Getting Started with PyParsing book, I got to use it. Here’s the script :
from pyparsing import SkipTo, Suppress, CaselessLiteral
import glob
# Example to match
# delete from TABLENAME
# where CUSTOMER_ID = ‘INTERNAL’;
table_name = [...]
I just bought and read the Getting Started with Pyparsing PDF book. And it’s good. PyParsing is a way of building a parser using Python code. You should think Yacc/Lex, but readable. It can be used to parse text, and it can also handle HTML.
This is the example from the PyParsing website :
from [...]
This is a book I want to read :
The ‘Finding things’ chapter, written by Tim Bray, was on the O’Reilly site before, but seems to have gone.
Also filed in
|
|