本文整理汇总了Python中html.HTML.br方法的典型用法代码示例。如果您正苦于以下问题:Python HTML.br方法的具体用法?Python HTML.br怎么用?Python HTML.br使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类html.HTML
的用法示例。
在下文中一共展示了HTML.br方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: writeHTML
# 需要导入模块: from html import HTML [as 别名]
# 或者: from html.HTML import br [as 别名]
def writeHTML(options):
from html import HTML
titles = options.titles
h = HTML('html')
h.p('Results')
h.br()
path = '.'
#methods = ['planenet', 'pixelwise', 'pixelwise+RANSAC', 'GT+RANSAC', 'planenet+crf', 'pixelwise+semantics+RANSAC']
#methods = ['planenet', 'pixelwise', 'pixelwise+RANSAC', 'GT+RANSAC']
for image_index in xrange(options.numImages):
t = h.table(border='1')
r_inp = t.tr()
r_inp.td('input ' + str(image_index + options.startIndex))
r_inp.td().img(src=path + '/' + str(image_index + options.startIndex) + '_image.png')
r = t.tr()
r.td('methods')
for method_index, method in enumerate(titles):
r.td(method)
continue
r = t.tr()
r.td('segmentation')
for method_index, method in enumerate(titles):
r.td().img(src=path + '/' + str(image_index + options.startIndex) + '_segmentation_pred_' + str(method_index) + '.png')
r.td().img(src=path + '/' + str(image_index + options.startIndex) + '_segmentation_pred_blended_' + str(method_index) + '.png')
continue
r = t.tr()
r.td('depth')
for method_index, method in enumerate(titles):
r.td().img(src=path + '/' + str(image_index + options.startIndex) + '_depth_pred_' + str(method_index) + '.png')
continue
h.br()
continue
metric_titles = ['depth error 0.1', 'depth error 0.2', 'depth error 0.3', 'IOU 0.3', 'IOU 0.5', 'IOU 0.7']
h.p('Curves on plane accuracy')
for title in metric_titles:
h.img(src='curve_plane_' + title.replace(' ', '_') + '.png')
continue
h.p('Curves on pixel coverage')
for title in metric_titles:
h.img(src='curve_pixel_' + title.replace(' ', '_') + '.png')
continue
html_file = open(options.test_dir + '/index.html', 'w')
html_file.write(str(h))
html_file.close()
return
示例2: mat
# 需要导入模块: from html import HTML [as 别名]
# 或者: from html.HTML import br [as 别名]
tier += 1
for ID in t:
i = gw.getItemData(ID)
newItem = mat(i['name'], i['sale_availability'],
i['offer_availability'], ID, i['min_sale_unit_price'],
i['max_offer_unit_price'], i['sale_price_change_last_hour'],
i['offer_price_change_last_hour'], tier)
items[ID] = newItem
# Generate HTML
page = HTML('html')
tier = 0
for t in tierMats:
tier += 1
page.br()
page.br()
table = page.table(border='1')
table.thead.th("Tier %d" % tier, colspan='3')
head = table.thead()
for s in ['Name','Min sell', 'Max buy']:
head.th(s)
for ID in t:
tr = table.tr()
for data in [items[ID].name, items[ID].sellPrice, items[ID].buyPrice]:
tr.td(str(data))
print "Content-type: text/html\n"
print page