Update example. Fix remaining Python3 compatibility issues.