Android+Python[new version]

[Guys], there is a good news that the android has had the capability for running python script.

On the Internet, the materials about this environment construction may be sufficient, but those are for the old version of the "SL4A".


Now, I will show you how to construct the python development and running environment for android.

That is the little case. If you are able to follow these steps below, you will run the python on android in few minutes.

[Steps]

(1)You need [Download] two files for your android.

a. "sl4a_r5.apk" , and you may find it in this page:http://code.google.com/p/android-scripting/downloads/list

b. "PythonForAndroid_r4.apk" , and this one is also in the page :http://code.google.com/p/android-scripting/downloads/list

(2)Push them into your android.

(3)Be sure that your android has been access to the Internet. If you wann accomplish this task soon, you may use the wifi.

[Pay attention to]This step is so significant that if you miss it, your cellphone may never run python. What's more, this is the exact distinction between the new one and the old version.

(4)Under your android, click the apk file called "sl4a_r5" to install it.

(5)Click the apk documentation called "PythonForAndroid_r4" to install it.

(6)Now, if everything goes right, you may have seen these two new icons on your android screen.

(7)But now, you have not installed the python interpret successfully. Then you need click the python icon to run it.

(8)Press the "install" button.

(9)Automatically, this program downloads the documentations which are essential for python.

(10)After that, you are able to run the python script on your android!

-----------------------------------------------------------------------------------------------------------------------------

[But you know], that is anightmare to edit the code on the cellphone. So what we can do?

[Propose]:

You may write the code on your PC and run it on android.

You know, there is the highlight,auto indent,debugand automatic matching of parentheses............ So why we not accept these helpful functions?

[You can] edit your python code on your PC. You may use your favorite emacs or vim. And then the thing you just need to do is pushing your code file into the "sl4a/scripts/" folder.

[After that] when you run the sl4a, your code documentation will be displayed in the front of you. [You just run it].

-------------------------------------------------------------------------------------------------------------------------------

Okay, [Python is wonderful]!






你可能感兴趣的:(android)