On Fri, Sep 02, 2005 at 01:45:42PM -0700, alexLIGO wrote:
> Can I force python to execute the program on the bash? What can
> I do?
os.system() is a wrapper on system(3), which invokes /bin/sh.
If you want to use a different shell, you can use
os.spawnv(os.P_WAIT, '/bin/bash', ['bash', '-c',
alexLIGO wrote:
> I am trying to run a python script that executes several other programs
> on the bash (under linux) and reads some of the output of those
> programs. This works fine for a couple of os.system() calls, but then
> it does not work anymore. os.system() returns always -1, but when
> e
Repeated calls to system() seem to cause no problem here.
I ran the following program:
import os
for i in xrange(1):
assert os.system("true") == 0
in around 25 seconds, the 'for' loop completed, and the 'true' command
always returned 0 from system, as expected.
No I read some other data files that has been created by the other
program. I am not interested in the stdout or err of that program...
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 2005-09-02 at 13:45 -0700, alexLIGO wrote:
> Hi,
>
> I am trying to run a python script that executes several other programs
> on the bash (under linux) and reads some of the output of those
> programs. This works fine for a couple of os.system() calls, but then
> it does not work anymore.
Hi,
I am trying to run a python script that executes several other programs
on the bash (under linux) and reads some of the output of those
programs. This works fine for a couple of os.system() calls, but then
it does not work anymore. os.system() returns always -1, but when
executing exactly the