"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.system()
But system() is deprecated in favour of the subprocess module.

Of course you could also modify your script to take a
path as a command line argument and use that to direct
the output explicitly...

Alan G.


_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to