Make examples Python 3 compatible