本文整理汇总了Python中kivy.Logger.warn方法的典型用法代码示例。如果您正苦于以下问题:Python Logger.warn方法的具体用法?Python Logger.warn怎么用?Python Logger.warn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kivy.Logger
的用法示例。
在下文中一共展示了Logger.warn方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: vibrate_cb
# 需要导入模块: from kivy import Logger [as 别名]
# 或者: from kivy.Logger import warn [as 别名]
def vibrate_cb(self, time=1):
try:
vibrator.vibrate(time)
except (NotImplementedError, ImportError):
Logger.warn(
"DEVICE: No vibrate function defined for {} platform.".format(
constants.PLATFORM))
else:
Logger.info("DEVICE: BUZZ!!")
示例2: notify_cb
# 需要导入模块: from kivy import Logger [as 别名]
# 或者: from kivy.Logger import warn [as 别名]
def notify_cb(self, title='', message='', timeout=1):
try:
notification.notify(
title=title,
message=message,
app_name=constants.APP_NAME,
app_icon=os.path.join(constants.KIVY_RESOURCE_PATH_1, 'icon.png'),
timeout=timeout
)
except (NotImplementedError, ImportError):
Logger.warn(
"DEVICE: No vibrate function defined for {} platform.".format(
constants.PLATFORM))
else:
Logger.info("DEVICE: Fired Notification!")
示例3: StreamManager
# 需要导入模块: from kivy import Logger [as 别名]
# 或者: from kivy.Logger import warn [as 别名]
from cryptikchaos.libs.utilities import bytes_to_num
from cryptikchaos.libs.utilities import md5hash
from cryptikchaos.libs.obscure import shuffler
from cryptikchaos.libs.obscure import unshuffler
from cryptikchaos.exceptions.streamExceptions import \
StreamOverflowError
from cryptikchaos.core.comm.stream.stream import Stream
if constants.AES_AVAILABLE:
Logger.info("STREAM: AES Crypto available.")
from Crypto.Cipher import AES
else:
Logger.warn("STREAM: AES Crypto unavailable.")
import struct
STREAM_TYPES = enum(UNAUTH=False, AUTH=True)
class StreamManager(StoreManager):
"Stream manager class."
def __init__(self, peerid, peerkey, peerhost):
# Authorized keys
self._valid_keys = (
'STREAM_FLAG',