Re: spawn* or exec* and fork, what should I use and how ?

2004-12-15 Thread Lingyun Yang
Peter Hansen wrote: Lingyun Yang wrote: I want to use python as a "shell like" program, and execute an external program in it( such as mv, cp, tar, gnuplot) os.execv("/bin/bash",("/usr/bin/gnuplot",'-c "gnuplot < plot.tmp"')) I would sugges

spawn* or exec* and fork, what should I use and how ?

2004-12-15 Thread Lingyun Yang
Hi, I want to use python as a "shell like" program, and execute an external program in it( such as mv, cp, tar, gnuplot) I tried: os.execv("/bin/bash",("/usr/bin/gnuplot",'-c "gnuplot < plot.tmp"')) since it's in a for-loop, it should be executed many times, but It exits after the first time runn