python - see output of print statements on android using kivy - kivy launcher -
i have created program print instructions on stdoutput while running . can see them when execute app on windows when run same app on android device samsung s3 not see output of print statements .
sometimes can see .kivy directory on device in same directory program log files contains kivy specific logs ignore print statement outputs .
can 1 give advice how use ...
use adb logcat output of application, or use 1 of apps available on-line display logs , grep 'python'.
detailed steps above::
enable developer options on device(google friend). enable usb debugging.
image taken http://androidfannetwork.com/
then connect device pc using usb cable type adb devices
in console. should show device (there might prompt asking permissions connect computer).
one simpler way use visual indication on widget instead of printing on console. create functions app bubprint
from kivy.core.window import window kivy.clock import clock kivy.factory import factory kivy.lang import builder builder.load_string(''' <infobubble@bubble> # declare our message stringproperty message: 'empty message' # let bubble of 200 device pixels # , expand necessary on height # depending on message + 20 dp of padding. size_hint: none, none show_arrow: false pos_hint: {'top': 1, 'right': 1} size: dp(200), lbl.texture_size[1] + dp(20) label: id: lbl text: root.message # constraint text displayed within # bubble width , have unrestricted # on height. text_size: root.width - dp(20), none ''') def bubbprint(self, message): message = repr(message) if not self.info_bubble: self.info_bubble = factory.infobubble() self.info_bubble.message = message # check if bubble not on screen if not self.info_bubble.parent: window.add_widget(self.info_bubble) # remove bubble after 2 secs clock.schedule_once(lambda dt: window.remove_widget(self.info_bubble), 2)
Comments
Post a Comment