Python generation finished
Improve and test python generator