Implement python3 compatibility

This PR makes this widget function in python 3 without breaking compatibility with python 2.7.

As an aside, VERY cool demo.