By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,054 Members | 1,322 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,054 IT Pros & Developers. It's quick & easy.

A automated operation through python script

P: 1
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?
Aug 28 '16 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.