qpython怎么安装kivy_QPython或Kivy用于Android编程,使用Python生成可安装ap

QPython allows usage of Kivy library for developing graphical applications

是的,qpython是一个解释器+相关工具,并且有一些很好的kivy集成。但是你不能用qpython+android单独将kivy代码编译成一个独立的apk。QPython and Kivy both use SL4A, while QPython has expanded standard SL4A (or it's bindings for Python) by adding some NFC and similar functions

Kivy不使用SL4A,我们主要通过pyjnius来实现android api的集成,pyjnius是一个用python自动包装java类的库,可以直接调用javaapi。我们还抽象了一些标准的东西到一个pythonic接口与plyer。

(我后来看到你已经找到了这些)QPython is used to create python scripts that can use wide range of modules, libraries, but they need QPython installed to be executed on target device. There is no way to package script into an apk.

我不怎么使用qpython,但我认为这是正确的,尽管在某些情况下可能有一些工具将脚本转换为apk(例如,如果您有kivy接口,可以使用kivy的构建工具,或者sl4a有这样的工具)。Kivy OTOH, allows developer to write applications that compile to apk, using their cloud based build system (alternative - local build system can be set up on Ubuntu Linux) [However, I noticed that most of the sample apk's that use Kivy are pretty large, in the 40MB range. Did I miss anything ?]

我们有一个基本的基于云的构建系统,但目前没有其他类似的系统,几乎每个人都使用我们的android构建工具在自己的机器上构建apk。它们运行在linux或OSX上,如果需要,可以很容易地在虚拟机中运行。

由于需要捆绑python解释器和许多模块,一个最小的应用程序大约有7MB的APK大小。QPython apk has 2 version i.e. one for Python-2.7 and another one for Python-3.x. For Kivy, I'm not sure which version it is.

Kivy本身支持python3,但我们的android构建工具目前只支持python2.7。Get the impression that both QPython and Kivy are developed by a single developer each (or only one person is really active at present), and don't yet have a biggish community. [This is my biggest concern] I notice that there are 3-4 questions with 'qpython' tag on SO, and more than thousand with 'kivy'!

Kivy开发非常活跃,有几个定期的贡献者,还有一些零星的贡献者。例如,您可以看到最近的提交活动on github。这肯定比一个开发人员多得多!Kivy seems to be trying to expand the nature of application that could possibly be written using it, compare to QPython. There are API's like plyer and pyjnius that help expand the possibilities. Perhaps quite significantly, compared to QPython.

我想qpython包括pyjnius。不太清楚普莱尔。Both QPython and Kivy seem to be heavily under development. Program (/ script) crashes (/ failures) seem to be reported on both set of tools.

我不知道你在看什么,但是任何不重要的项目都会报告崩溃/失败/错误。我不认为基维天生就不稳定。Overall, the opinion as a result (of above points) appears to swing in favour of Kivy, a bit more.

我会说qpython和kivy是完全不同的东西。Qpython允许您编写和运行脚本,而kivy是一个图形框架和相关工具,用于创建独立的应用程序。两者都可以完成的任务有一些重叠,但也有很多不适合两者的地方——例如,我认为qpython可能更方便地制作没有gui的快速脚本,例如简单的自动化(我认为这是可能的),但我认为kivy是一个更好的选择,它可以创建独立的应用程序,而不是简单的gui。当然,如前所述,您可以用qpython编写kivy代码,但对于任何非琐碎的事情来说,这都不是一个很好的用户体验,您无论如何都需要一台台式机/笔记本电脑来制作一个独立的apk。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值