Modify sensortag.py to be py2.7 and py3.4 compatible