Python2.7

Made the code Python 2.6 ad Python 2.7 compatible.