Python cutgenerator done. Needs testing. Also some memory problems fixed.