Python script to produce latex tables