Migrating the phyton 2.7