Then no changes would be necessary, just use the default autopilot (APM). Why do you want to use Python? If this is something you want to do, then there are native libraries to do this. I used a native library on my Arduino, there are RPi libraries also. But you would need to write the entire PID control algorithm, perhaps this is your goal.