Execute C code through Python

sjdevnull at yahoo.com sjdevnull at yahoo.com
Fri Oct 21 20:23:28 CEST 2005


Grant Edwards wrote:
> On 2005-10-21, Ernesto <erniedude at gmail.com> wrote:
>
> > Thanks.  Can anyone provide an example of using *subprocess* to run
> > helloWorld.C through the python interpreter.
>
> No.  You can't run a .C file

Unless you have a C interpreter installed. e.g.:

  import os
  os.system("eic helloWorld.C")

(Requires eic to be in your PATH.)

I doubt it's what the OP was looking for, though.

http://eic.sourceforge.net/




More information about the Python-list mailing list