Python controller