Hi all,
I am attempting to use a Python program to change into a specified
directory before executing some commands. However, when I call the Python
program from my Unix shell (tcsh) using a command such as
"python myprogram.py"
It runs without changing directory. Just to clarify, the lines of code in
question are the following:
import os
MyDir = "/usr/local/myDir"
os.system("cd "+myDir)
I have also tried "os.chdir(MyDir)", but that doesn't work either - it just
runs without actually changing directory. As a side note, when I run the
same commands above within the Python interactive environment, it works
just fine.
I am running Python version 2.4.
Thanks!
-Andy
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor