Python3 compatibility of examples