Executing a C program from Python
vishakha406 at yahoo.com
Mon Apr 6 19:56:03 CEST 2009
I am very new to python. I have my cgi script written in Python. My CGI script should call a C program and collect the value returned by this program and pass it to the browser.
Can anyone help me out in this. How can I execute the c program and collect the return value.
a=os.system("my-app")//my-app is the C program executable
But the variable a prints 0 everytime. It should return a non-zero value as per my C program. Is there any method to do what I need.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list