How to execute a makefile from LINUX system.

Chris Rebert clp at rebertia.com
Tue Oct 21 08:03:48 CEST 2008


On Mon, Oct 20, 2008 at 10:32 PM, gaurav kashyap
<gauravkec2005 at gmail.com> 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
>



More information about the Python-list mailing list