Sometimes this concept of working directory is essential, especially when calling another system or executable programs.
import os
os.chdir('c:\\thepath\\')
os.system('the command') # otherwise, if the command need to read some file within same folder, the command can not find it, because the needed file is not in the current working directory.
import os
os.chdir('c:\\thepath\\')
os.system('the command') # otherwise, if the command need to read some file within same folder, the command can not find it, because the needed file is not in the current working directory.
Powered by ScribeFire.
No comments:
Post a Comment