Add example script
Use new-style classes for python 2