I have a python script that generates files. All I want to do is make it write files in a specific folder. Now I have to take 3 steps:
cd foo
python ../awesome_script.py
cd ..
Is there a nice solution where I can do this on a single line using either an external command or directly in the python interpreter?
I am looking for something like:
python -f foo awesome_script.py
or
cd_in_and_out_program foo awesome_script.py
This instruction will be in the makefile afterwards, so it can be ugly.
source
share