How do i run an external program in an python script?

Thomas M. Thomas.Sunshine at web.de
Tue Jul 22 10:18:58 EDT 2003


> I have no idea about python. I got a c++ program which i want to be
> called from an python script. How do i do that?
> 
> My programs path under Linux is:
> /bin/Prinit

import os
(prinit_input, prinit_output) = os.popen2('/bin/Prinit')


input and output are filelike objects...

     





More information about the Python-list mailing list