Scanner generator for Python