The python code for PPS+