本文整理汇总了Python中pyasm.web.WebContainer.clear_buffer方法的典型用法代码示例。如果您正苦于以下问题:Python WebContainer.clear_buffer方法的具体用法?Python WebContainer.clear_buffer怎么用?Python WebContainer.clear_buffer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyasm.web.WebContainer
的用法示例。
在下文中一共展示了WebContainer.clear_buffer方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: CherryPyAdapter
# 需要导入模块: from pyasm.web import WebContainer [as 别名]
# 或者: from pyasm.web.WebContainer import clear_buffer [as 别名]
# this response.body is not needed, can be commented out in the future
response.body = ''
return html_response
# check to see if this project exists in the database?
#project = Project.get_by_code(project_code)
#print project
try:
from pyasm.web import WebContainer, DivWdg
from pyasm.widget import Error404Wdg
from cherrypy30_adapter import CherryPyAdapter
# clear the buffer
WebContainer.clear_buffer()
adapter = CherryPyAdapter()
WebContainer.set_web(adapter)
top = DivWdg()
top.add_style("background: #444")
top.add_style("height: 300")
top.add_style("width: 500")
top.add_style("margin: 150px auto")
top.add_style("border: solid 1px black")
top.add_style("border-radius: 15px")
top.add_style("box-shadow: 0px 0px 15px rgba(0,0,0,0.5)")
widget = Error404Wdg()
widget.status = status