本文整理汇总了Python中HTML.HTML.start_html_refresh方法的典型用法代码示例。如果您正苦于以下问题:Python HTML.start_html_refresh方法的具体用法?Python HTML.start_html_refresh怎么用?Python HTML.start_html_refresh使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTML.HTML
的用法示例。
在下文中一共展示了HTML.start_html_refresh方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: createReports
# 需要导入模块: from HTML import HTML [as 别名]
# 或者: from HTML.HTML import start_html_refresh [as 别名]
def createReports(symObj,site,datacenter,sid):
#
www = HTML()
# Create directories if they don't exist
f = Files()
f.dir = "/www/" + site + "/OR/"
f.mkdir()
htmlfile = '/www/' + site + '/OR/index.html'
perf = '/opt/EMC/Scripts/shell/rcopyperf_' + sid + '.log'
f.read_file(perf)
page = []
page.append(www.start_html_refresh('OR Sessions'))
page.append(www.EMC_Header(site,datacenter))
page.append(www.start_table(1,"OR Port Performance"))
header = ["FA Port","MB/s","Ceiling","Number of Devices"]
page.append(www.th_list(header))
perftotal = 0
for line in f.readfile:
line = line.strip()
fields = line.split()
if len(fields) == 5:
fields = fields[1:5]
perftotal += int(fields[1])
page.append(www.tr_list(fields))
page.append(www.tr + www.th + "Total OR MB/s" + www.th + str(perftotal))
page.append(www.end_table)
page.append('<br><br><pre>\n')
for line in symObj.or_list:
page.append(line)
f.write_file(htmlfile,page)