Execute C code through Python

Fredrik Lundh fredrik at pythonware.com
Fri Oct 21 11:24:51 EDT 2005


"Ernesto" wrote:

> Thanks.  Can anyone provide an example of using *subprocess* to run
> helloWorld.C through the python interpreter.

compile helloWorld, and run:

    import subprocess
    subprocess.call("helloWorld")

(any special reason why you couldn't figure this out yourself, given the
example provided by gsteff ?)

</F> 






More information about the Python-list mailing list