Execute C code through Python

Ernesto erniedude at gmail.com
Mon Oct 24 16:10:21 CEST 2005

Fredrik Lundh wrote:
> "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>

There is a reason (though it is not special).  I'm new to Python.  I
looked at all the documentation on subprocess, as well as popen.  I
couldn't figure it out, so I thought an example (which I thank you for
providing) would help me along (which it did).  Is there a special
reason for you having a problem with me asking for help?  I thought
that's what this group is for.

More information about the Python-list mailing list