A simple variant of AWK in Python.