Kivy QPython app on Android Moto G phone - no log

2019-08-09 02:53发布

I'm having some trouble with my Kivy apps when run from the QPython launcher.

If I run the standard pong example, I don't see any output.

This used to work. So, I suspect that QPython, or Kivy has taken an 'upgrade' which has broken something.

In the past I would be able to swipe down to see the log output icon. But, now that's no longer there. Well done QPython, Kivy !!!!

So, what's changed? And, how am I supposed to check program log output to see why it no longer runs?

Regards

Nick

2条回答
三岁会撩人
2楼-- · 2019-08-09 03:27

I don't know about qpython's log stuff, but you can see the kivy log output by viewing the logcat stream, e.g. from an attached computer (with developer mode enabled) using adb logcat.

This has always been possible and is the standard way to view the log output with kivy (and with android in general). It sounds like your direct problem relates to a change in qpython.

查看更多
叛逆
3楼-- · 2019-08-09 03:39

As I replied to Zaphod's post on the missing log before my answer was removed: I've made an issue on qpython's github about that problem and the dev have answered. The "no log information" is a bug and he should remove it in the next update. As a temporary fix, I reroute my stdout and stderr to .run.log:

import sys
f=open('.run.log','w') 
f.close()
sys.stdout=open('.run.log','a') 
sys.stderr=open('.run.log','a')

Laurent

查看更多
登录 后发表回答