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, and is it easy? > > the way I have been using python to run other executables is > > os.system('path/my.executable input')
Have a look at the subprocess module. You should be able to do something like: subprocess.Popen(['path/my.executable'], cwd='path') I am not sure of the actual keyword to be used, so please look at the docs... Tiago. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor