本文整理汇总了Python中dialog.Dialog.start方法的典型用法代码示例。如果您正苦于以下问题:Python Dialog.start方法的具体用法?Python Dialog.start怎么用?Python Dialog.start使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dialog.Dialog
的用法示例。
在下文中一共展示了Dialog.start方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: start
# 需要导入模块: from dialog import Dialog [as 别名]
# 或者: from dialog.Dialog import start [as 别名]
def start(self, delay_msec=UPDATE_MSEC):
Dialog.start(self)
self.schedule_display_task(delay_msec)
height = int(self.driver.canvas['height'])-100
self.scrollbar.place(x=0, y=0, width=SCROLLBAR_WIDTH, height=height)
self.listbox.place(x=SCROLLBAR_WIDTH, y=0, width=self.driver.canvas['width'], height=str(height))
self.checkbox.place(x=10, y = height+10)
示例2: start
# 需要导入模块: from dialog import Dialog [as 别名]
# 或者: from dialog.Dialog import start [as 别名]
def start(self, delay_msec=UPDATE_MSEC):
Dialog.start(self)
self.throttle_gauge = self._new_gauge(0, 'Throttle', 'red', minval=0) # T
self.roll_gauge = self._new_gauge(1, ' Roll', 'blue') # A
self.pitch_gauge = self._new_gauge(2, ' Pitch', 'green') # E
self.yaw_gauge = self._new_gauge(3, ' Yaw', 'orange') # R
self.switch_gauge = self._new_gauge(4, ' Aux', 'purple')
self.schedule_display_task(delay_msec)
示例3: int
# 需要导入模块: from dialog import Dialog [as 别名]
# 或者: from dialog.Dialog import start [as 别名]
scope.way = "forward"
elif movement_way == "back":
scope.way = "backward"
else:
responses.put("failed")
scope._exit = True
scope.move_time = int(scope.move_time)
scope.distance = scope.move_time
scope.position = 0
def after(scope, responses):
scope.channel.send(None)
if scope.channel.receive() == "success":
pass
@handle(callbacks, before=before, after=after)
def movement(requests, responses, scope):
if not scope.stopped:
print(scope.position)
scope.channel.send(scope.way)
scope.position += 0.1
time.sleep(0.1)
if scope.position >= scope.distance:
responses.put("finished")
scope._exit = True
if __name__ == "__main__":
DLG = Dialog(globals())
DLG.load("control.dlg")
DLG.start()