s4-dns: use neater python for reading lines