[Barnes & Noble Nook Tablet] tobdaryl:
Why python? - How to Install Python!

Why python?

Check post #26 by fattire in this thread.

http://xdaforums.com/showthread.php?t=1480586&highlight=python&page=3

I tried to follow several threads on the internet to install Python on Android and made a mess of each or dead ended when I could not complete one of the required steps. This works for me (CM7-internal-Alpha-Final). I backed up with (CWM) before I started, completed this tutorial, and flashed back to before so I could complete it again.

How to install Python!

My info on how I installed and setup python.

All of this is done on the NT. If you wish to download it with your pc and place in download folder on your sdcard that will work also.

sl4a http://code.google.com/p/android-scripting/

chose sl4a_5.apk http://code.google.com/p/android-scripting/downloads/detail?name=sl4a_r5.apk&can=2&q

But I want to install python.

We will install python through sl4a and it will provide a shell to write and run python scripts as well as sl4a if you choose. This makes proper setup easy, easy. It also keeps all your programs and scripts in one place with a one click menu.

Run sl4a after it is installed. Hit menu at the bottom and select add. From here you can add Folder, HTML and JavaScript, Shell, Scan Barcode. For now we will not add anything here.

Menu again and this time View. Interpreters, Triggers, Logcat. We are interested in Interpreters so select it. Now we have Shell listed at the top of the window. We are interested in adding Python so on Menu at the bottom select Add. Now we have a list of 7 items to choose from. Choose Python 2.62. Your browser will open and present you with Save as -PythonForAndroid_r5.apk. Click OK. Click on the above file added to download folder on your sdcard. Install and click done.

Run “Python for Android” in your apps. Don't panic it is slow to show on screen. Click Install when the screen shows the Python for Android menu. It begins downloading files and and installing. Once complete you are again presented with the menu. Click Browse Modules. This will pull your browser and show python-for-android page. Click Download pyserial-2.6-py2.6egg. Click the save as button. Now do the same for Twisted and Zope. (I didn't download PyBluez as bluetooth is not working in CM7 at this time). Choose what you wish. Close browser.

Now back to Python. When menu appears choose Import Modules. The files you just downloaded appear for installation. Choose each one pyserial, Twisted, and zope in my case and they are installed for you in the proper locations. Close Python.

Back to SL4A. When you open sl4a you will now see a list of python scripts. Now we will get our editor. Quick touch one of the scripts – I choose weather. Now we get a picture type menu. We can open in shell, option, edit (the pencil), save, delete, and etc. Click the pencil to edit. Here is where we can add our editor. “Don't click use by default' and you will always have a choice of editors. You can choose later but we want the SL4A editor loaded because it has special features for use in SL4A, so choose SL4A. The editor will be downloaded and installed for you. This editor is not my favorite for some things but is useful to have(check its menu) along with your favorite editor. My favorite is Jota Text Editor. You're Done!

Now enjoy python! Make something pretty or down and dirty but try to make something.

I can't be of help on actual use but believe it or not this is as easy as I could make this install and have a proper environment to work with.

I hope you enjoy it.