Calling C programs

C GIllespie csgcsg39 at hotmail.com
Thu Mar 4 09:35:27 EST 2004



> from os import popen

> print popen("/tmp/hello").read()

What about if I want to pass an argument?

I've tried

input,output=popen2('/tmp/hello')

input.write("Some string")

input.close() # I get an error here.

Thanks

Colin





More information about the Python-list mailing list