This question already has an answer here:
I'm using Ubuntu 11.10. The python 2.7.2 provided has a bug that has been corrected in the latest 2.7.2 sources from the python repository.
What is the recommended way to replace the ubuntu provided python with the python from source? Or put another way, how do I "update" the ubuntu-provided one? Ideally, I would just be able to create new .deb(s) that "update" the python2.7/python2.7-dev provided by Ubuntu.