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

Discussion in 'Python' started by Tamer Higazi, Jul 22, 2003.

  1. Tamer Higazi

    Tamer Higazi Guest

    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
    Tamer Higazi, Jul 22, 2003
    #1
    1. Advertising

  2. Tamer Higazi

    John Hunter Guest

    >>>>> "Tamer" == Tamer Higazi <> writes:

    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
    John Hunter, Jul 22, 2003
    #2
    1. Advertising

  3. Tamer Higazi

    Thomas M. Guest


    > 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...
    Thomas M., Jul 22, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dmitry Duginov

    Run external program during BUILD?

    Dmitry Duginov, May 2, 2005, in forum: ASP .Net
    Replies:
    6
    Views:
    700
    Chris R. Timmons
    May 2, 2005
  2. ash
    Replies:
    5
    Views:
    297
  3. Replies:
    5
    Views:
    12,412
  4. pradeep nair
    Replies:
    2
    Views:
    529
  5. Mellow Crow
    Replies:
    6
    Views:
    404
    Richard Cornford
    Nov 4, 2005
Loading...

Share This Page