First draft export of controllers as Python class based on flat if-else

tulip.dumpsmach is introduced to gather routines for code generation.