Updated to python 3

Updated the demo code to play well for python 3 users