2to3 fixes for python examples