from BeautifulSoup import BeautifulSoup
import table

# fname = '../datafiles/CV_1fan1Table.html'
# txt = open(fname, 'r').read()
# soup = BeautifulSoup(txt)
# head, body = table.getheadbody(soup)
# 
# bt1 = table.gettitletable(body, all=True)

# for item in btable:
#     try:
#         if obj.name == 'table':
#             tables.append(obj)
#     except AttributeError, e:
#         pass

# fname = '../datafiles/CV_1fan2Table.html'
# txt = open(fname, 'r').read()
# soup = BeautifulSoup(txt)
# head, body = table.getheadbody(soup)
# 
# bt2 = table.gettitletable(body, all=True)
# 
# tables1 = []
# for obj in body.contents:
#     try:
#         if obj.name == 'table':
#             tables1.append(obj)
#     except AttributeError, e:
#         pass
# 
# diff = []
# if len(bt1) != len(bt1):
#     print 'diferent number of tables'
# for t1, t2 in zip(bt1, bt2):
#     if t1 != t2:
#         diff.append((t1, t2))
# for item in diff:
#     ((b1, t1), (b2, t2)) = item
#     b1 = item[0][0]
#     print 'here'
# 
# difft = []
# for (b1, t1), (b2, t2) in diff:
#     difft.append((table.table2matrix(t1), table.table2matrix(t2)))
# 
# t1, t2 = difft[0]   

#tablediff 

