Python3 portability, except for texttable