Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I write native iPhone, Android, Windows, Blackberry apps using Python? [duplicate]

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.

like image 349
ParasDevD Avatar asked May 05 '13 07:05

ParasDevD


People also ask

Can you use Python to make iPhone apps?

While Android and iOS will not run interpreted code, you can use a Python mobile app framework like Kivy or BeeWare to write your mobile application in Python and then cross-compile it for Android or iOS. Learn more about Python's built-in elements.

Can iPhone run Python scripts?

With regards your technical question, iOS does not include a built-in Python interpreter. If you want to run Python scripts, you'll have to build a Python interpreter into your app.

Can I run Python script on Android?

Python can run on Android through various apps from the play store library. This tutorial will explain how to run python on Android using Pydroid 3 – IDE for Python 3 application. Features : Offline Python 3.7 interpreter: no Internet is required to run Python programs.

How do I run Python Mobile?

You can use the Termux app, which provides a POSIX environment for Android, to install Python. Note that apt install python will install Python3 on Termux. For Python2, you need to use apt install python2 . +1 for Termux.


2 Answers

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.

like image 87
Nishant Tyagi Avatar answered Oct 01 '22 21:10

Nishant Tyagi


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

like image 41
Herman Avatar answered Oct 01 '22 22:10

Herman