Not sure what happened to the formatting here... It should be:
-
"Alan Gauld" <[EMAIL PROTECTED]> wrote
The given example for os.system is:
sts = os.system("mycmd" + " myarg")
==>
p = Popen("mycmd" + " myarg", shell=True)
sts = os.waitpid(p.pid, 0)
To which you would need to
"Andre Walker-Loud" <[EMAIL PROTECTED]> wrote
> this module.class - if someone with more experience would feel
> inclined to provide an example, I would be very much appreciative.
The subprocess module documentation has several examples
of using both the Popen class and the call function.
Th
Thank you everyone for the help. I have two solutions, but I would
love one that uses the subprocess.Popen() - I have no experience with
this module.class - if someone with more experience would feel
inclined to provide an example, I would be very much appreciative.
SOLUTION 1 (my brute for
"Andre Walker-Loud" <[EMAIL PROTECTED]> wrote
> If I were using CSH, I could do all this very simply by having these
> lines in my script
>
> ### .csh file
>
> cd /scratch
> my_exe.csh
The best answer is to use subprocess as Kent suggested
but you can also use os.chdir(path) before using os.syste
On Thu, Oct 04, 2007 at 03:15:41PM -0400, Andre Walker-Loud wrote:
> what I need to do is have my python script run another executable,
> but it must do it from a directory different from the one I am in, it
> needs to run in the /scratch/ directory (again not my choice)
>
> Is this possible,
Andre Walker-Loud wrote:
> Hi All,
>
> lets say I am in Dir A (out of my control because I have submitted a
> job to a queuing system)
>
> and I have a python script which is running in this directory - the
> one I submitted to the queue
>
> what I need to do is have my python script run ano
Hi All,
lets say I am in Dir A (out of my control because I have submitted a
job to a queuing system)
and I have a python script which is running in this directory - the
one I submitted to the queue
what I need to do is have my python script run another executable,
but it must do it from a