本文整理匯總了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)