import TableParse import csv html='
HeadingAnother Heading
row 1, cell 1row 1, cell 2
row 2, cell 1row 2, cell 2
' nodes=TableParse.parse(html) c=csv.writer(open('data', 'w')) for i in range(0,len(nodes)): c.writerow(nodes[i]) ''' data contains: Heading,Another Heading "row 1, cell 1","row 1, cell 2" "row 2, cell 1","row 2, cell 2" '''