I have a python script, which generates files. All i want is to force it to write the files in a specific folder. Right now i have to do 3 steps:
cd foo
python ../awesome_script.py
cd ..
Is there any nice solution, where i can do this in one line, either using some external command, or directly in the python interpreter?
I am searching for something like:
python -f foo awesome_script.py
or
cd_in_and_out_program foo awesome_script.py
This instruction will be in a makefile afterwards, so it can be ugly.
If the problem is just "one line":
cd foo; python ../awesome_script.py; cd ..
will do
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With