本文整理汇总了Python中owanimo.util.log.LOG.info方法的典型用法代码示例。如果您正苦于以下问题:Python LOG.info方法的具体用法?Python LOG.info怎么用?Python LOG.info使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类owanimo.util.log.LOG
的用法示例。
在下文中一共展示了LOG.info方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: login
# 需要导入模块: from owanimo.util.log import LOG [as 别名]
# 或者: from owanimo.util.log.LOG import info [as 别名]
def login(self):
self.start()
time.sleep(15)
while not self.enable("login.png"):
self.start(); time.sleep(5)
if self.tap("maintain_ok.png"):
L.warning("Maintenance Time.")
return
if not self.tap("login.png", self._adb.get().TMP_PICTURE):
L.warning("Can't Tap : login.png")
return
time.sleep(5)
if self.tap("login_bonus.png"):
time.sleep(2); self.capture(self._adb.get().TMP_PICTURE)
if self.tap("return.png", self._adb.get().TMP_PICTURE):
time.sleep(2); self.capture(self._adb.get().TMP_PICTURE)
if self.tap("info_ok.png", self._adb.get().TMP_PICTURE):
time.sleep(2); self.capture(self._adb.get().TMP_PICTURE)
if self.tap("info_ok.png", self._adb.get().TMP_PICTURE):
time.sleep(2); self.capture(self._adb.get().TMP_PICTURE)
if not self.enable("login_check.png", self._adb.get().TMP_PICTURE):
time.sleep(2)
if self.enable("battle_menu.png", self._adb.get().TMP_PICTURE):
if self.quest_puyo_all():
L.info("Clear.")
elif self.tap("quest_ok.png", self._adb.get().TMP_PICTURE):
L.info("Quest Clear.")
L.warning("Can't Login.")
return False
return True
示例2: quest_result
# 需要导入模块: from owanimo.util.log import LOG [as 别名]
# 或者: from owanimo.util.log.LOG import info [as 别名]
def quest_result(self):
time.sleep(5)
if self.enable("quest_result.png"):
L.info("You Win !")
return True
else:
L.error("You Lose.")
return False
示例3: quest_result_first
# 需要导入模块: from owanimo.util.log import LOG [as 别名]
# 或者: from owanimo.util.log.LOG import info [as 别名]
def quest_result_first(self):
while not self.enable("quest_support_ok.png"):
self._tap(int(self._adb.get().WIDTH) / 2,
int(self._adb.get().HEIGHT) / 2)
time.sleep(5)
self.tap("quest_support_ok.png", self._adb.get().TMP_PICTURE); time.sleep(2)
self.capture(self._adb.get().TMP_PICTURE)
if self.enable("chance_boss.png"):
L.info("Emergency Boss !")
return True
else:
L.error("As always, It is peace.")
return False
示例4: strategy
# 需要导入模块: from owanimo.util.log import LOG [as 别名]
# 或者: from owanimo.util.log.LOG import info [as 别名]
def strategy(self, array):
time1 = time.clock()
self.set_array(array)
self.candidate = []
self.max = Node([])
self.max.set_score(-1)
self._strategy()
L.info("Optimal Solution : %s" % self.max.get_list())
L.info("Score : %d" % self.max.get_score())
time2 = time.clock()
L.info("Elapsed time : %s" % str(time2 - time1))
return self.max.get_list()
示例5: strategy
# 需要导入模块: from owanimo.util.log import LOG [as 别名]
# 或者: from owanimo.util.log.LOG import info [as 别名]
def strategy(self, array):
time1 = time.clock()
self.set_array(array)
score, arr = self._strategy()
time2 = time.clock()
result = []
for a in arr:
result.append([a[0], a[1]])
L.info("Optimal Solution : %s" % result)
L.info("Score : %d" % score)
L.info("Elapsed time : %s" % str(time2 - time1))
return result
示例6: after
# 需要导入模块: from owanimo.util.log import LOG [as 别名]
# 或者: from owanimo.util.log.LOG import info [as 别名]
def after(self):
L.info("*** End Allegory : %s *** " % __file__)
self.stop()
示例7: before
# 需要导入模块: from owanimo.util.log import LOG [as 别名]
# 或者: from owanimo.util.log.LOG import info [as 别名]
def before(self):
L.info("*** Start Allegory : %s *** " % __file__)
self.start()
示例8: get_picture
# 需要导入模块: from owanimo.util.log import LOG [as 别名]
# 或者: from owanimo.util.log.LOG import info [as 别名]
def get_picture(self, path):
try:
return Image.open(path, 'r')
except IOError, (errno, strerror):
L.info("I/O error(%s): %s" % (errno, strerror))
raise IOError(strerror)