running a c program from a python script

Scott David Daniels scott.daniels at acm.org
Sat Dec 3 12:08:30 EST 2005


johnclare wrote:
> Help - I'm (very) new to python.  I want to run run a c executable from
> a python script - how do I do this?
> 
> Many thanks for your help,
> j
> 
generally:
     import os
     os.execl(program_location)
Look in os, Process management for further details.  The next time
you ask, you really should mention your OS and Python versions; the
fiddley details differ.

--Scott David Daniels
scott.daniels at acm.org



More information about the Python-list mailing list