本文整理汇总了Python中car.Car._kill方法的典型用法代码示例。如果您正苦于以下问题:Python Car._kill方法的具体用法?Python Car._kill怎么用?Python Car._kill使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类car.Car
的用法示例。
在下文中一共展示了Car._kill方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_collisions
# 需要导入模块: from car import Car [as 别名]
# 或者: from car.Car import _kill [as 别名]
def test_collisions():
car = Car()
car._vicon_client.start()
time.sleep(2)
print "Running..."
try:
car._detect_collisions()
except KeyboardInterrupt:
car._kill = True
time.sleep(.5)
print "Done"
示例2: test_bystander
# 需要导入模块: from car import Car [as 别名]
# 或者: from car.Car import _kill [as 别名]
def test_bystander():
# no collision detection
car = Car()
car._vicon_client.start()
car._talker.start()
car._message_worker.start()
car._main_worker.start()
try:
raw_input("Running... press enter to stop\n")
except KeyboardInterrupt:
pass
car._driver.stop()
car._driver.destroy()
car._kill = True
car._vicon_client.stop()
car._talker.stop()
car._message_worker.join()
car._main_worker.join()
print "Done"