First time here? Check out the FAQ!
You can sort of do this by using subprocess to spawn FFmpeg to extract an "SRT" stream, then read the set file. FFmpeg