本文整理汇总了Python中npyscreen.BoxTitle方法的典型用法代码示例。如果您正苦于以下问题:Python npyscreen.BoxTitle方法的具体用法?Python npyscreen.BoxTitle怎么用?Python npyscreen.BoxTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类npyscreen
的用法示例。
在下文中一共展示了npyscreen.BoxTitle方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: import npyscreen [as 别名]
# 或者: from npyscreen import BoxTitle [as 别名]
def main(self):
""" 'main' function of npyscreen.NPSApp application object
this function help in initial widget setup and rendering
"""
# time(ms) to wait for user interactions
self.keypress_timeout_default = 10
# Form widget instance
self.window = WindowForm(parentApp=self, name="Doga : HTTP Log Monitor",)
# setup a section for Alert status
self.alert_status = self.window.add(npyscreen.TitleText, name="Alert Status", max_height=3)
self.alert_status.value = ""
self.alert_status.editable = False
# setup a section for Doga status
self.doga_status = self.window.add(npyscreen.TitleText, name="Doga Status", max_height=3, rely=4)
self.doga_status.value = ""
self.doga_status.editable = False
# setup a section for Doga logs
self.doga_logs = self.window.add(npyscreen.BoxTitle, name="Doga Logs", max_width=50, relx=2, rely=7)
self.doga_logs.entry_widget.scroll_exit = True
self.doga_logs.values = []
# setup a section for Alert history
self.alert_history = self.window.add(npyscreen.BoxTitle, name="Alert History", max_width=75, relx=52, rely=7)
self.alert_history.entry_widget.scroll_exit = True
self.alert_history.values = []
# update parent widget by embedding sub-widgets
self.window.edit()
示例2: create
# 需要导入模块: import npyscreen [as 别名]
# 或者: from npyscreen import BoxTitle [as 别名]
def create(self):
self.results = self.parentApp.RESULTS
self.results_box = self.add(npyscreen.BoxTitle, name='Results')
if self.parentApp.CLEAN_RESULTS:
self.results_box.values = self.parentApp.CLEAN_RESULTS