made python3 compatible

only changes were in example.py and everything seems to be fine.