Re: Problems with os.system

2005-09-02 Thread jepler
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',

Re: Problems with os.system

2005-09-02 Thread Michael Hoffman
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

Re: Problems with os.system

2005-09-02 Thread jepler
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.

Re: Problems with os.system

2005-09-02 Thread alexLIGO
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

Re: Problems with os.system

2005-09-02 Thread marduk
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.

Problems with os.system

2005-09-02 Thread alexLIGO
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