import subprocess
import re
output = subprocess.check_output(['less', 'BAG_15m_kzh_2012_de.pdf'])
re_data_prefix = re.compile('^[0-9]+[.].*$')
re_data_fields = re.compile('(([^ ]+[ ]?)+)')
for line in output.splitlines():
    if re_data_prefix.match(line):
        pass
How to scrape tables in thousands of PDF files?