on-internet
← Community

HTML module in python

Stack Overflow ·

I am trying to execute this example code using Python2.7 and it is throwing me error as 'module' object has no attribute 'table'. Can any one help me regarding the correct html module. import html file = open('1.html', 'w') table_data = [ ['S.No', 'test1 - role'], ['1', 'a', 'b'], ['2', 'c', 'd'], ] htmlcode = html.table(table_data) c=htmlcode print htmlcode file.writelines(c)

Comments

Sign in or sign up to comment and upvote.

No comments yet.