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


Python HTML.h1方法代码示例

本文整理汇总了Python中html.HTML.h1方法的典型用法代码示例。如果您正苦于以下问题:Python HTML.h1方法的具体用法?Python HTML.h1怎么用?Python HTML.h1使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在html.HTML的用法示例。


在下文中一共展示了HTML.h1方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: index

# 需要导入模块: from html import HTML [as 别名]
# 或者: from html.HTML import h1 [as 别名]
 def index(self):
   h = HTML()
   h.h1("Hello world")
   h.h2("And")
   h.h3("Bye")
   indexString= str(h)
   return indexString
开发者ID:tomacorp,项目名称:thermapythia,代码行数:9,代码来源:serv.py

示例2: HTML

# 需要导入模块: from html import HTML [as 别名]
# 或者: from html.HTML import h1 [as 别名]
__author__ = 'chris'
from html import HTML
import subprocess
import xml.etree.ElementTree as ET

tree = ET.parse('test.xml')
root = tree.getroot()

H = HTML('html')

H.h1("Speed in milliseconds")

rrd_dump = subprocess.check_output(
    ["rrdtool", "dump", "test.rrd", "test.xml"])

for ds in root.findall('ds'):
    #	name = ds.find('name').text
    last = ds.find('last_ds').text

ms = int(last)


def colour(x):
    if x < 2000:
        return ('green')
    else:
        return ('red')


fontc = colour(ms)
开发者ID:tcsyn,项目名称:check_sky,代码行数:32,代码来源:colour.py


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