Can I write native iPhone, Android, Windows, Black

2019-03-08 13:53发布

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.

2条回答
我命由我不由天
2楼-- · 2019-03-08 14:31

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.

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.

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....

查看更多
唯我独甜
3楼-- · 2019-03-08 14:46

Yes you can use 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.

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

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

Hope it helps you.

查看更多
登录 后发表回答