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

T

Tamer Higazi

Hi!
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

For any help,

Thank you


Tamer
 
J

John Hunter

Tamer> Hi! I have no idea about python. I got a c++ program which
Tamer> i want to be called from an python script. How do i do
Tamer> that?

http://groups.google.com

Search for: python run external program

John Hunter
 
T

Thomas M.

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...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,019
Latest member
RoxannaSta

Latest Threads

Top