update Python generater (not working)