Ivan Vinogradov wrote:
> Dear All,
>> I would greatly appreciate a nudge in the right direction concerning
> the use of cwd argument in the call function from subprocess module.
>> The setup is as follows:
>> driver.py <- python script
> core/ <- directory
> main <- fortran executable in the core directory
>>> driver script generates some input files in the core directory. Main
> should do its thing and dump the output files back into core.
> The problem is, I can't figure out how to do this properly.
>> call("core/main") works but uses .. of core for input/output.
>> call("core/main",cwd="core") and call("main",cwd="core") both result in
[snip exception]
Usually current directory is not in the PATH on UNIX. Try
call("./main",cwd="core")
-- Leo