473,386 Members | 1,775 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

A automated operation through python script

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
0 962

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

Similar topics

7
by: Andrew Chalk | last post by:
Is this possible? In my CGI app. I display a web page with a link (anchor). When the link is clicked I want to exectute a python script rather than go to an HTML page. Many thanks.
22
by: Brad Tilley | last post by:
Is it possible to write a file open, then read program in C and then call the C program from a Python script like this: for root, files, dirs in os.walk(path) for f in files: try:...
7
by: Pankaj | last post by:
The module which i am creating is like Part A: 1. It does some processing by using python code. 2. The result of this python code execution is written to a text file. ] Part B: 1. I read a...
3
by: diffuser78 | last post by:
I am a newbie in Python and want your help in writing python script. I have to remotely shut the windows px from linux box. I run OpenSSH on windows PC. I remotely connect it from Linux box using...
6
by: tatamata | last post by:
Hello. How can I run some Python script within C# program? Thanks, Zlatko
5
by: Shuaib | last post by:
Hi! I have a python script which returns an Integer value. How do I call this script from a C programe, and use the result returned? Thanks for your time.
2
by: giovannifreda | last post by:
I am new to python and I am wondering if there is a way to take a python script and turn it into an object of some kind such that the python system doesn't have to take the script and compile it down...
1
by: michael.buonomo | last post by:
We have been using the Google recommended python script for about a year. We recently realized that the script was not crawling our sites url's, but just our folders which reside on the server. The...
4
by: Quill_Patricia | last post by:
I have a Python script which is used to load data into a database. Up to now this script has been run by customers from the Windows command prompt using "python edg_loader.pyc". Any error messages...
1
by: ManojNaidu | last post by:
Hi, Please send Automated DB2 Backup Script on Windows machine to me. Full backup, Incremental backup and Delta backup scripts. OS : Windows 2003
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.