How to execute a makefile from LINUX system.

Discussion in 'Python' started by gaurav kashyap, Oct 21, 2008.

  1. Hi all,
    I am using Link-41b parser in my program.
    The windows version of it has an .exe file that can be executed using
    os.system command
    On Linux version,I have a makefile.

    so my question is:
    How to run the makefile using some python function.

    Thanks
     
    gaurav kashyap, Oct 21, 2008
    #1
    1. Advertising

  2. gaurav kashyap

    Chris Rebert Guest

    On Mon, Oct 20, 2008 at 10:32 PM, gaurav kashyap
    <> wrote:
    > Hi all,
    > I am using Link-41b parser in my program.
    > The windows version of it has an .exe file that can be executed using
    > os.system command
    > On Linux version,I have a makefile.
    >
    > so my question is:
    > How to run the makefile using some python function.


    Use the 'subprocess' module
    (http://docs.python.org/library/subprocess.html#module-subprocess) to
    run the 'make' command in the same working directory as the Makefile
    with the appropriate target as an option.

    Cheers,
    Chris
    --
    Follow the path of the Iguana...
    http://rebertia.com

    >
    > Thanks
    > --
    > http://mail.python.org/mailman/listinfo/python-list
    >
     
    Chris Rebert, Oct 21, 2008
    #2
    1. Advertising

  3. Thanks
     
    gaurav kashyap, Oct 21, 2008
    #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. markus
    Replies:
    22
    Views:
    685
    Dances With Crows
    Sep 22, 2004
  2. Replies:
    4
    Views:
    839
  3. Nagaraj
    Replies:
    1
    Views:
    916
    Lionel B
    Mar 1, 2007
  4. Savas Ates
    Replies:
    1
    Views:
    304
    Patrice
    Aug 17, 2004
  5. Barry

    Makefile Linux

    Barry, Jun 12, 2012, in forum: C Programming
    Replies:
    24
    Views:
    1,095
    88888 Dihedral
    Sep 6, 2012
Loading...

Share This Page