Basti's Scratchpad on the Internet
14 May 2020

File Parsing with Python Video Tutorial

This video series was produced in the spring of 2020, during the COVID19-pandemic, when all lectures had to be held electronically, without physical attendance. It is a tutorial, in German, for parsing text files, and basic unit testing.

If the videos are too slow, feel free to speed them up by right-clicking, and adjusting play speed (Firefox only, as far as I know).

You may also download the videos and share them with your friends. Please do not upload them to social media or YouTube, but link to this website instead. If you want to modify them or create derivative works, please contact me.

Creative Commons License
The Qt for Python Video Tutorial by Bastian Bechtold is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.

1 Intro

Prerequisites: A basic understanding of Python, and a working installation of python ≥3.6.

An overview over the topics discussed in the rest of the videos, and installation of pytest.

2 INI: First Steps

Basic setup, and our first test.

Code: and

3 INI: Sections

Parsing INI sections.

Code: and

4 INI: Variables

Parsing INI variable assignments.

Code: and

5 INI: Bugfixes and Integration Tests

Parsing difficult values, and comments.

Code: and

6 INI: Test the Tests

Tests can be wrong, too.

7 CSV: First Prototype

A simple parser for values without quotes.

Code: and

8 CSV: Quotes

Parsing quoted values makes everything harder.

Code: and

9 CSV: A Few More Features

Comments and a choice of separators.

Code: and

10 JSON: Keyword Parser

Parsing the simplest of JSON expressions.

Code: and

11 JSON: Strings

Parsing JSON strings is not as simple as it seems.

Code: and

12 JSON: Numbers

Numbers in JSON.

Code: and

13 JSON: Data Structures

The rest of JSON: Objects and Arrays.

Code: and

14 Regular Expressions 1

How to parse parts of INI files with regular expressions.


15 Regular Expressions 2

How to parse parts of JSON files with regular expressions.


16 Wrapup

A summary of the topics discussed.

Tags: programming python
Other posts
Creative Commons License by Bastian Bechtold is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.