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 of M and then call program C in the script, actually i found that the shell command could be sent from python script to system through:
os.sys('./C -x x -xe xe')
but such a way could not take the active value of pair (x, xe) since the results of the pair may not be the same, what i want was each time i got the pair value i could sent it to the shell command and run C.
Does any other solution could be used?