Mod to the common fun in python and also to table2html.py