[Tutor] how to specify working directory from within python app?

Kent Johnson kent37 at tds.net
Thu Sep 20 21:40:54 CEST 2007


Rob Andrews wrote:
> I've got a weekly project here in which I have to take a somewhat
> arbitrary number of input files, create working directories in which
> to process each of them, and call other programs from within the scope
> of those directories.

Use subprocess.call() to run the external program and supply the working 
directory path in the cwd parameter.

Kent


More information about the Tutor mailing list