running a C program with python script

Discussion in 'Python' started by M.N.A.Smadi, Mar 9, 2005.

  1. M.N.A.Smadi

    M.N.A.Smadi Guest

    hi;

    how can i do the following:
    1- run a C program from a python script
    2- pass that C program an argument
    3- Read the out of the program into a buffer that is local to the script

    thanks
    m.smadi
     
    M.N.A.Smadi, Mar 9, 2005
    #1
    1. Advertisements

  2. M.N.A.Smadi

    Thomas Ganss Guest

    M.N.A.Smadi schrieb:
    > hi;
    >
    > how can i do the following:
    > 1- run a C program from a python script
    > 2- pass that C program an argument
    > 3- Read the out of the program into a buffer that is local to the script
    >
    > thanks
    > m.smadi

    in addition to the other approaches:
    if you want only a few specific lines of c you can inline the code.
    google for scipy, weave, inline and python

    HTH

    thomas
     
    Thomas Ganss, Mar 9, 2005
    #2
    1. Advertisements

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. johnclare
    Replies:
    2
    Views:
    357
    johnclare
    Dec 3, 2005
  2. Benjamin Rutt
    Replies:
    2
    Views:
    1,098
    Peter Hansen
    Dec 20, 2005
  3. Replies:
    1
    Views:
    627
    Walter Roberson
    Aug 12, 2005
  4. Lorenzo Bettini
    Replies:
    3
    Views:
    786
    Lorenzo Bettini
    Sep 24, 2005
  5. Alexander Mahone

    Running a program (gperf) inside another C program

    Alexander Mahone, May 26, 2008, in forum: C Programming
    Replies:
    4
    Views:
    609
    Flash Gordon
    May 26, 2008
  6. Shadow123
    Replies:
    1
    Views:
    484
    Shadow123
    Jul 9, 2008
  7. Stef Mientki
    Replies:
    0
    Views:
    426
    Stef Mientki
    Nov 1, 2009
  8. Laurent Verweijen

    Running a program from another program.

    Laurent Verweijen, Jun 17, 2010, in forum: Python
    Replies:
    0
    Views:
    337
    Laurent Verweijen
    Jun 17, 2010
Loading...