[codegenerator] python: extend swig template to support class variables
[legacy] hide C++ only public class variables from swig
python: don't consider scripts which threw an exception as successful