Wednesday, October 24, 2012

New release of App Engine SDK 1.7.3 with full Django 1.4 on Python 2.7

Google has just released the App Engine SDK 1.7.3 which these col features: fully support Django 1.4 on Python 2.7.

It's good to hear that now the latest release version 1.4.x of Django can run on Python 2.7, and not lagging much on the support for the latest Python 2.x family. This is what I've been waiting for!

The full release notes is at here.

I am going to try get my hands on it!

Wednesday, August 1, 2012

Python 2.6 on Google App Engine local environment

Today I play yet another session with Google App Engine Python. On one of the GTUG Singapore meeting, Wesley Chun did mention that GAE is actually almost completely compatible with Python 2.6, though GAE is based and run on Python 2.5. There is some minor problem when you are using certain obscure feature or library -- which doesn't really matter.
It's obvious when you install GAE SDK the installer try to detect the presence of Python 2.5.

In fact I found out that I cannot send encrypted user/password authentication when still using the default Python 2.5 on my Windows box. I have both Python 2.5 and 2.6 installation on my box. The installer detected the availability of Python 2.5.

Interestingly, I found it easier to run GAE and install applications to the server when using Python 2.6 on my box.

Python 2.4 for Installation Scripting of Tomcat-based Application

The company that I work now was rolling out the application to one of our clients. It turns out the industry we are in favoured the Red Hat Enterprise Linux (RHEL) and SuSE Linux Enterprise Server (SLES). Our application runs on any platforms that Java supports, but for reasons clients have their own preference. Personally that time I have been using Ubuntu for desktop Linux more often. As the time goes by I need to hone my skills on the RHEL as well.

The approach with this client is a bit different from the rest, as we work together for almost one year to close the gap between the application and the business requirements through iteration. In the methodology that we use (Scrum) it is called "sprint". After each 2 sprints we need to deliver a working application to the client, which will be installed by their server admins. In the industry we are in, we usually are not allowed to access the server machines remotely. We need to deliver package with the instructions on how to install it and get it working. As this application is running on Apache Tomcat, we initially just bundle everything inside and deliver a tarball, database dump and installation instructions to the client.

As few iterations went by, new requirements and wishes emerged (as usual)!

Need to run the same application in the same machine in 2 different environment (database and TCP ports). We delivered 2 separated tarballs with ports hard coded.

Then there were needs to run more than 2 environments in single machine. This complicates the problem when you hard code the port numbers.

We shop around to see what open source installer options available, especially ones that can run well without GUI and very few dependencies need to be installed. Eventually we came into conclusion that we'd better develop our own installer script to have much greater control over what's happening.

I opt in for Python. It's there in most Linux/UNIX servers.

Ubuntu has Python 2.6 as the base of apt-get tools. Both RHEL's yum tool and SLES yast2 tool. All are sophisticated package dependency management tools!

I have (successfully) uninstalled Python 2.6 from Ubuntu, and also uninstalled Python 2.4 from CentOS.  Oh, please don't do this at home!

At least it's encouraging that Python actually serves at the heart of these wonderful Linux distros. You can't just get rid of Python on those distros.

We came with Python 2.4.x as the winner, as it is the lowest common denominator. Python 2.4 script will mostly run without modification on Python 2.6. You can't uninstall Python 2.4 from RHEL or SLES (at least not for now!).

The library side of the code is open sourced:
But I still need some time to tidy up the code and wiki there.

If you have the same requirements like:

  1. Need to deploy an application running on Tomcat (or other application servers)
  2. Need to prompt and modify (or parameterize) on installation:
    1. values which will go inside the XML or properties files inside your Tomcat folders
    2. values that needs to go inside your WAR file
    3. values that needs to go inside your JAR file inside WAR file
    4. the installation folder location
    5. etc.
This project may be useful for you as well.

Thursday, March 24, 2011

Using setuptools or easy_install in Jython

Jython has got better support from tools such setuptools (the easy_install).
According to the manual, you just need to download from here:
Then run:
$ jython

Sunday, November 28, 2010

Bullet on my own foot: trying to uninstall Python 2.6 from Ubuntu 9.10 Karmic Koala

Some major Linux distros use Python for maintaining their packages. Red Hat (and its downstream distros) which use the yum tool uses Python 2.4. I tried to install Python 2.6 in CentOS 5.4 without success. The tool rejected to install Python other than 2.4 using that tool out of fear that it will interfere with the tool.

I just found another catch, when you are trying to install Python 2.6 in Ubuntu (I was using Karmic Koala, 9.10), such as:
[source lang='shell']
$ sudo apt-get remove python2.6

It will display the components that are about to be removed.
Kids, don't try this at home!
It will remove your whole desktop related application! Java, Gnome, apt tools. You practically will be left with command line Linux, and without the apt tools.

Uninstalling Python 2.6 from Ubuntu seems to be an act of shooting own's foot!

Lucky I tried on not-so-important experimental Ubuntu installation on my laptop.

Saturday, July 10, 2010

Again about Google DevFest 2010

Yesterday I had to leave an hour earlier from the Google DevFest 2010 event, as I have to  catch up with my wife, she was waiting for me for the second Antenatal Class. I missed the Code Lab, the Maps and Buzz T-shirts. Ouch. 5:30pm I had to leave while they ended the event on 6:30pm.

Flash back: After lunch time, there were some presentations on Google Apps, by Patrick Chanezon, followed by success story of people who developed applications for Google Apps. One from ( Another round from SingPath (

One thing that was missed a lot is the power points (aka power plugs). It was awful so many people carrying laptop and no power plug on the Connexis Theater. Almost everyone were running out of battery.

I just don't know why the crowd was kinda lacking enthusiasm to verbally respond to the speaker on stage with 'ooo's, 'aaaa's, 'yeah's, 'alright's and stuffs. Most of the time the crowd was silent.

Nevertheless it was a must-attend event of this year. I will attend the next event for sure.


Friday, July 9, 2010

In Google DevFest 2010

Currently I am attending the Google DevFest 2010. Timothy Jordan and Bob Aman in their presentation on Open Social.

Today the registration was pretty crowded, and they differentiate based on the first letter of your first name. I was in the "A-F queue". The queue was long and the registration process was draggy.

They changed the schedule a bit, Daniel Lee presented the Google Maps as opposed to the initial schedule on the web site: Google DevFest 2010 in Singapore. He showed us how to create a coffee shop location based informative web site as an example.

After the first session, Jeremy Orlow, an engineer working on the Chrome team, explained the HTML5 and the Chrome. They skipped the Q&A for HTML5 and Chrome. May be they pushed forward because we're late because of the registration, so in order to finish during the lunch time, the organizer advised to ask in person to Jeremy during lunch time for anyone who want to ask questions.

Then here comes the third session, and its about  Open Social.  Tim was of more lively presenter than others I think. More like MC may be? Google Buzz API stuffs, atom, OAuth, Salmon, Pubsubhubbub etc.