Introducing py3k compatibility. Added a python example.