I am working under the following project directory.
work/project/test/a.py
then, inside a.py, I have to use the subprocess.POPEN
to launch the process from another directory,
work/to_launch/file1.pl, file2.py, file3,...,
(note: the file1.pl will call file2.py, file3. etc)
e.g. inside a.py, I use
subprocess.POPEN("usr/bin/perl ../to_launch/file1.pl")
and under work/project/, I type the following
[user@machine project]python test/a.py,
error "file2.py, 'No such file or directory'"
how can I add "work/to_launch/", so that these dependent file2.py, file3... can be found?
PLEASE NOTE: i have tried to use the append sys.path
, but it seems that is for the modules search, not for the file.