Calling C programs

Miki Tebeka miki.tebeka at
Thu Mar 4 13:48:12 CET 2004

Hello Colin,

> I have a simple C program which outputs a string. I want to be able to call
> this progam from python and assign the output to a variable. What's the best
> way to do this?
from os import popen
print popen("/tmp/hello").read()



More information about the Python-list mailing list