Feature/python3 examples generator

Fix example generator for python 3.