a simple python script that writes all table data to a csv file