Ubuntu 12.04 includes Python 2.7.3 and Python 2.6 is no longer available for install.If you need to run legacy software which only support Python 2.6.Below steps will show you how to install Python 2.6 from PPA,alternatively you also can build it yourself.
1.Open a Terminal by pressing CTL+ALT+t
2.Run below command to add PPA to your repository
3.Then you can update your repository and install Python 2.6
4.You are done,enjoy.