Convert python 3.4 scripts to be python 2.7 compatible