writing tex tables from python