I have two programs, say M and C. M have two quantities x and xe as outputs, the x and xe served as input to C. Since each time i got a pair of (x, xe) i must run C by hand, i want to find a way to make this process automated.

C was an python script, to run it one should type:
./C -x x -xe xe
in the command line. So i wander if i could write a python script which firstly extract the value of (x, xe) in the result file...