Update python template for 2/3 compatibility.