Re: Execute C code through Python

2005-10-26 Thread Ernesto
Peter Hansen wrote: > > Google found the following (after I read the docs for subprocess and > learned about the "startupinfo" flag, and searched for "subprocess > startupinfo"). Does this help? > > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/409002 > > -Peter Thanks Peter! That's

Re: Execute C code through Python

2005-10-25 Thread Peter Hansen
Ernesto wrote: > So i generated the .exe file "myFile.exe" > > This is a Windows - text based application. Right now, when I run: > > import subprocess > subprocess.call("myFile") > > the application starts in its own console window. Is there a way for > it to run inside the python interface?

Re: Execute C code through Python

2005-10-25 Thread Ernesto
So i generated the .exe file "myFile.exe" This is a Windows - text based application. Right now, when I run: import subprocess subprocess.call("myFile") the application starts in its own console window. Is there a way for it to run inside the python interface? Thanks, -- http://mail.python.

Re: Execute C code through Python

2005-10-24 Thread Fredrik Lundh
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 y

Re: Execute C code through Python

2005-10-24 Thread Ernesto
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

Re: Execute C code through Python

2005-10-21 Thread [EMAIL PROTECTED]
Grant Edwards wrote: > On 2005-10-21, Ernesto <[EMAIL PROTECTED]> 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.sy

Re: Execute C code through Python

2005-10-21 Thread Steve Holden
Grant Edwards wrote: > On 2005-10-21, Micah Elliott <[EMAIL PROTECTED]> wrote: > >>On Oct 21, Grant Edwards wrote: >> >>>I'm guessing you're using Windows based on the question. >> >>+1 QOTW. > > > Yow! That's two in one day, what do I win? > If my experience is anything to go by it just means

Re: Execute C code through Python

2005-10-21 Thread Grant Edwards
On 2005-10-21, Micah Elliott <[EMAIL PROTECTED]> wrote: > On Oct 21, Grant Edwards wrote: >> I'm guessing you're using Windows based on the question. > > +1 QOTW. Yow! That's two in one day, what do I win? -- Grant Edwards grante Yow! I'll take ROAST BEEF

Re: Execute C code through Python

2005-10-21 Thread Micah Elliott
On Oct 21, Grant Edwards wrote: > I'm guessing you're using Windows based on the question. +1 QOTW. -- _ _ ___ |V|icah |- lliott http://micah.elliott.name [EMAIL PROTECTED] " " """ -- http://mail.python.org/mailman/listinfo/python-list

Re: Execute C code through Python

2005-10-21 Thread Grant Edwards
On 2005-10-21, Ernesto <[EMAIL PROTECTED]> 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. You can run a .exe file (I'm guessing you're using Windows based on the question). -- Grant Edwa

Re: Execute C code through Python

2005-10-21 Thread Fredrik Lundh
"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 exa

Re: Execute C code through Python

2005-10-21 Thread Ernesto
Thanks. Can anyone provide an example of using *subprocess* to run helloWorld.C through the python interpreter. -- http://mail.python.org/mailman/listinfo/python-list

Re: Execute C code through Python

2005-10-20 Thread gsteff
import subprocess subprocess.call("cmd") -- http://mail.python.org/mailman/listinfo/python-list

Re: Execute C code through Python

2005-10-20 Thread Diez B. Roggisch
Ernesto wrote: > What's the easiest and quickest way to execute a compiled C "command > line interface" program THROUGH Python? I don't know what you mean by THROUGH. But the subprocess, popen2 and os-modules deal with calling other programs. Try them in that order. Diez -- http://mail.python.o

Execute C code through Python

2005-10-20 Thread Ernesto
What's the easiest and quickest way to execute a compiled C "command line interface" program THROUGH Python? -- http://mail.python.org/mailman/listinfo/python-list