当前位置: 首页>>代码示例>>Python>>正文


Python HTML.br方法代码示例

本文整理汇总了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
开发者ID:euivmar,项目名称:PlaneNet,代码行数:59,代码来源:predict.py

示例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
开发者ID:elfez,项目名称:gw2utils,代码行数:32,代码来源:gw2mats.py


注:本文中的html.HTML.br方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。