是否有可能使用Python编写跨平台的应用程序为iOS和Android? [英] Is it possible to use Python to write cross-platform apps for both iOS and Android?

查看:1015
本文介绍了是否有可能使用Python编写跨平台的应用程序为iOS和Android?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用Python写为iOS和Android跨平台的应用

Is it possible to use Python to write cross-platform apps for both iOS and Android

推荐答案

是的,但它不是pretty的。

Yes, but it ain't pretty.

有关谷歌Android提供了一些所谓的ASE(Android的脚本环境),它允许使用脚本语言(包括Python)的在Android上运行。更多细节这里

For Android Google provides something called ASE (Android Scripting Environment) which allows scripting languages (Python included) to run on Android. More details here

有关iOS的,这可能是十分复杂一点(我会建议检查最新版本的iOS SDK协议,以检查法律的现状 - 苹果倾向于允许和放大器;定期不允许这样的应用程序)。对于技术部分,你可能需要的Python和放大器之间的接口;目标C,以及做一些巫术静态链接所有库的Python要求;全部详情可这里。 为iOS Python开发的另一种方法是将嵌入一个Python跨preTER到你的应用程序,并用它发布你的Python脚本(所以要很好地与苹果的游戏规则)。在这种情况下,您的Python应用程序将被包装与你的脚本,并自动运行它的Python跨preTER。 正如我所说的 - 它不是pretty的

For iOS, it might be quite a bit more complicated (and I'd advise to check the latest version of iOS SDK agreement to check the current state of the law - apple tends to allow & disallow such apps periodically). For the technical part you might need to interface between Python & Objective C as well as do some wizardry to statically link all the libraries Python requires; full details are available here. Another approach for iOS Python development would be to embed a Python interpreter into you app and distribute your Python script with it (so to play nicely with Apple rules). In this case your Python application would be a Python interpreter which is packaged with your script and runs it automatically. As I've said - it ain't pretty

这篇关于是否有可能使用Python编写跨平台的应用程序为iOS和Android?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆