我能用Python编写原生iPhone、Android、Windows和黑莓应用程序吗?(复制)

时间:2023-01-23 14:36:39

This question already has an answer here:

这个问题已经有了答案:

Is possible to develop Android and iOS mobile applications in Python? I am a newcomer in mobile applications and want to develop mobile applications in Python.

能否在Python中开发Android和iOS移动应用程序?我是移动应用领域的新手,想在Python中开发移动应用。

2 个解决方案

#1


18  

Yes you can use kivy

是的,你可以用kivy

This is a nice cross platform python framework which works for Android, Win7, Linux, Mac. iOS is possibile but very trivial as Apple doesn't allow scripting.

这是一个很好的跨平台python框架,适用于Android、Win7、Linux和Mac. iOS,它可能是可行的,但由于苹果不允许编写脚本,所以它非常微不足道。

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

对于Android谷歌提供了ASE (Android脚本环境),允许在Android上运行脚本语言(包括Python)。更多细节在这里

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 You can check details Here

对于iOS Python开发,将Python解释器嵌入到您的应用程序中,并使用它分发您的Python脚本(以便与Apple规则很好地配合)。在这种情况下,您的Python应用程序将是一个Python解释器,它与您的脚本打包并自动运行它。正如我说过的,这不太好你可以在这里查看细节

Hope it helps you.

希望它能帮助你。

#2


4  

Not out of the box. The final product needs to be compiled (iOS) or in bytecode (Android). Since it may be possible to convert Python code to Objective-C or something in between it might be possible.

不是从盒子里出来的。最终的产品需要编译(iOS)或字节码(Android)。因为可以将Python代码转换为Objective-C或者介于两者之间的东西。

See Kivy — the previous thread referenced it. This allows you to write you app in Python but probably uses a common wrapper (that Kivy provides) to run Python.

参见Kivy——前面的线程引用它。这允许您使用Python编写应用程序,但可能使用一个通用的包装器(Kivy提供)来运行Python。

Please note that code written in Objective-C (iOS) or Java (Android) will always be faster than middle-ware like Kivy or Phonegap. Unless the one developing is very bad at writing any of those native languages....

请注意,使用Objective-C (iOS)或Java (Android)编写的代码总是比Kivy或Phonegap等中等软件快。除非一个发展非常不擅长写作的母语....

#1


18  

Yes you can use kivy

是的,你可以用kivy

This is a nice cross platform python framework which works for Android, Win7, Linux, Mac. iOS is possibile but very trivial as Apple doesn't allow scripting.

这是一个很好的跨平台python框架,适用于Android、Win7、Linux和Mac. iOS,它可能是可行的,但由于苹果不允许编写脚本,所以它非常微不足道。

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

对于Android谷歌提供了ASE (Android脚本环境),允许在Android上运行脚本语言(包括Python)。更多细节在这里

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 You can check details Here

对于iOS Python开发,将Python解释器嵌入到您的应用程序中,并使用它分发您的Python脚本(以便与Apple规则很好地配合)。在这种情况下,您的Python应用程序将是一个Python解释器,它与您的脚本打包并自动运行它。正如我说过的,这不太好你可以在这里查看细节

Hope it helps you.

希望它能帮助你。

#2


4  

Not out of the box. The final product needs to be compiled (iOS) or in bytecode (Android). Since it may be possible to convert Python code to Objective-C or something in between it might be possible.

不是从盒子里出来的。最终的产品需要编译(iOS)或字节码(Android)。因为可以将Python代码转换为Objective-C或者介于两者之间的东西。

See Kivy — the previous thread referenced it. This allows you to write you app in Python but probably uses a common wrapper (that Kivy provides) to run Python.

参见Kivy——前面的线程引用它。这允许您使用Python编写应用程序,但可能使用一个通用的包装器(Kivy提供)来运行Python。

Please note that code written in Objective-C (iOS) or Java (Android) will always be faster than middle-ware like Kivy or Phonegap. Unless the one developing is very bad at writing any of those native languages....

请注意,使用Objective-C (iOS)或Java (Android)编写的代码总是比Kivy或Phonegap等中等软件快。除非一个发展非常不擅长写作的母语....