How to install python2.5 in ubuntu 11.04 ?

Today for some urgent programs, need to work in Python 2.5 in Ubuntu 11.04.

But Ubuntu 11.04 is giving Python 2.7 by default. So I tried to install Python 2.5 but got some difficulties.
So I did R & D and found this solution. I know its very helpful so sharing with you guys.

sudo add-apt-repository ppa:fkrull/deadsnakes
sudo apt-get update
sudo apt-get install python2.5