Monday, May 7, 2012

Python for Android, Part 1

We are now in the stage where we will start our learning curve on Android, and first things first. We need to prepare our development platform.

My assumptions are the following:
So we begin by installing Java, in this case Open Java JDK. Please follow the next steps (taken from Ubuntu Community Documentation Java):
  1. On a terminal window add the following commands:
    sudo apt-get install openjdk-6-jre
    sudo apt-get install icedtea6-plugin
    sudo apt-get install openjdk-6-jdk

  2. Download and Install the Android Development Kit:
    Download the Android SDK Starter Package
    Instructions on Installing the SDK

  3. Untar, unzip, and install (this is the latest version to the date of this post):
    cd
    tar -xzvf android-sdk_r18-linux.tgz
    sudo mv android-sdk-linux/ /opt
    cd /opt
    sudo ln -s android /opt/android-sdk-linux
    sudo chown -R (your-user-id):(your-user-group-id) 
    *

    NOTE I recommend to install in /opt (which is what I did), yet you can do it where ever you may want.

  4. Now execute the installer:
    cd tools
    ./android

  5. Select Android 2.2 latest revision and the Android SDK download will begin!

This is it, now stay tuned for Part 2 coming soon!

Sunday, April 29, 2012

Learning Python

So far so good! I have now managed to create my 1st webapp following the HF Python book, and one neat feature to know (though I come from a Django background, is the use of the CGI debugger feature!

If your like me, learning the ins and outs of the Python foundation, this will allow you to get more information on the standard error, streamed at the browser, for debugging purposes (HF Python, page 248). Add the following two lines of code to your main webapp script and let Python take care of showing you the details of the errors it has found:



import cgitb
cgitb.enable()

So now we go on to Python for Android and I'm sure you will like these two links:

Friday, April 27, 2012

Python 3

I have now formally started the python 3 learning curve, and have to say that Head First Python is a must read for any beginner or mid-level. Stay tuned for news and highlights on this new phase!