本文整理汇总了Python中device.Device.print_rows方法的典型用法代码示例。如果您正苦于以下问题:Python Device.print_rows方法的具体用法?Python Device.print_rows怎么用?Python Device.print_rows使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类device.Device
的用法示例。
在下文中一共展示了Device.print_rows方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Device
# 需要导入模块: from device import Device [as 别名]
# 或者: from device.Device import print_rows [as 别名]
import time
import itertools
import informers
from device import Device
device = Device()
device.print_rows("Starting", "informer")
informer_functions = []
for (name, function) in informers.__dict__.items():
if name.endswith('informer'):
informer_functions.append(function)
time.sleep(5)
device.print_rows("Hi!", "My name is Box.")
time.sleep(7)
device.print_rows("Nice to meet", "you there!")
time.sleep(7)
for informer in itertools.cycle(informer_functions):
try:
informer(device)
except Exception as error:
print('Problem with', informer, error)
continue
time.sleep(7)