本文整理汇总了Python中breve.Template.doctype方法的典型用法代码示例。如果您正苦于以下问题:Python Template.doctype方法的具体用法?Python Template.doctype怎么用?Python Template.doctype使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类breve.Template
的用法示例。
在下文中一共展示了Template.doctype方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: open
# 需要导入模块: from breve import Template [as 别名]
# 或者: from breve.Template import doctype [as 别名]
host = 'localhost',
port = 53306,
user = 'xxxxxxx',
passwd = 'xxxxxxx',
db = 'minecraft'
)
lwc = sqlite3.connect('/home/mc/backup/plugins/LWC/lwc.db')
f = open('/home/mc/backup/plugins/PermissionsBukkit/config.yml', 'r')
data = yaml.safe_load(f)
f.close()
modaccounts = [u[0] for u in dict.items(data['users']) if 'modaccount' in u[1]['groups'] ]
moderators = [u[0] for u in dict.items(data['users']) if 'moderator' in u[1]['groups'] ]
day = sys.argv[1]
t = Template ( tags, root = '.' )
t.doctype = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'
vars = dict (
day = day,
players = map(collectActivity, modaccounts),
)
logblock.close()
lwc.close()
print t.render ( 'index', vars )