Python script to take recorder start recording

Hi,
Does anyone know if there is any python script to do take recorder start and stop recording?