Book description
Need to extract data from a text file or a web page? Or do you want to make your application more flexible with user-defined commands or search strings? Do regular expressions and lex/yacc make your eyes blur and your brain hurt?
Pyparsing could be the solution. Pyparsing is a pure-Python class library that makes it easy to build recursive-descent parsers quickly. There is no need to handcraft your own parsing state machine. With pyparsing, you can quickly create HTML page scrapers, logfile data extractors, or complex data structure or command processors. This Short Cut shows you how!
Table of contents
-
Getting Started with Pyparsing
- What Is Pyparsing?
- Basic Form of a Pyparsing Program
- "Hello, World!" on Steroids!
- What Makes Pyparsing So Special?
- Parsing Data from a Table—Using Parse Actions and ParseResults
- Extracting Data from a Web Page
- A Simple S-Expression Parser
- A Complete S-Expression Parser
- Parsing a Search String
- Search Engine in 100 Lines of Code
- Conclusion
- Index
- About the Author
Product information
- Title: Getting Started with Pyparsing
- Author(s):
- Release date: October 2007
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9780596514235
You might also like
book
Essential SQLAlchemy, 2nd Edition
Dive into SQLAlchemy, the popular, open-source code library that helps Python programmers work with relational databases …
book
Practices of the Python Pro
Practices of the Python Pro teaches you to design and write professional-quality software that’s understandable, maintainable, …
book
Refactoring: Improving the Design of Existing Code
Fully Revised and Updated–Includes New Refactorings and Code Examples “Any fool can write code that a …
book
Practical Process Automation
In today's IT architectures, microservices and serverless functions play increasingly important roles in process automation. But …