本文整理汇总了Python中kivy.Logger.exception方法的典型用法代码示例。如果您正苦于以下问题:Python Logger.exception方法的具体用法?Python Logger.exception怎么用?Python Logger.exception使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kivy.Logger
的用法示例。
在下文中一共展示了Logger.exception方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: on_fanState
# 需要导入模块: from kivy import Logger [as 别名]
# 或者: from kivy.Logger import exception [as 别名]
def on_fanState(self, instance, value):
#TODO 3 send turn on/off fans to serial port
Logger.exception(self.__class__.__name__ + ': in [' + whoAmI() + '] fanState is ' + str(self.fanState) + ' but NOT IMPLEMENTED YET')
popup = Popup(title='fanState Not implemented yet',
content=Label(text='fanState Not implemented yet'),
size_hint=(0.4, 0.2) )
popup.open()
示例2: on_heaterState
# 需要导入模块: from kivy import Logger [as 别名]
# 或者: from kivy.Logger import exception [as 别名]
def on_heaterState(self, instance, value):
#TODO 3 set the heater duty cycle and make sure the duty cycle timer is running
#also schedule a safety timer to force the heater off from time to time
#TODO also add to initialisation and shutdown to force heater off
Logger.exception(self.__class__.__name__ + ': in [' + whoAmI() + '] heaterState is ' + str(self.heaterState) + ' but NOT IMPLEMENTED YET')
popup = Popup(title='heaterState Not implemented yet',
content=Label(text='heaterState Not implemented yet'),
size_hint=(0.4, 0.2) )
popup.open()
示例3: _get
# 需要导入模块: from kivy import Logger [as 别名]
# 或者: from kivy.Logger import exception [as 别名]
def _get(self, mimetype='text/plain'):
clippy = PythonActivity._clipboard
data = ''
if sdk < 11:
data = clippy.getText()
else:
ClipDescription = autoclass('android.content.ClipDescription')
primary_clip = clippy.getPrimaryClip()
if primary_clip:
try:
data = primary_clip.getItemAt(0)
if data:
data = data.coerceToText(
PythonActivity.mActivity.getApplicationContext())
except Exception:
Logger.exception('Clipboard: failed to paste')
return data