changing current dir and executing a shell script
Thorsten Kampe
thorsten at thorstenkampe.de
Fri May 27 18:18:53 EDT 2011
* suresh (Fri, 27 May 2011 14:25:52 -0700 (PDT))
> I want to execute the following command line stuff from inside python.
> $cd directory
> $./executable
>
> I tried the following but I get errors
> import subprocess
> subprocess.check_call('cd dir_name;./executable')
>
> Due to filename path issues, I cannot try this version.
> subprocess.check_call('./dir_name/executable')
os.chdir?
More information about the Python-list
mailing list