tl;dr: looking for:
python3.5 --working-dir=~/company_repo/ ~/company_repo/something.py
There are company Python scripts owned by the teams responsible for them; my bash scripts call a sequence of them:
myscript.sh
python3.5 ~/company_repo/scripts/helper1.py someargument
python3.5 ~/company_repo/scripts/helper2.py
Some company scripts rely on being run within the company repo, because they call git commands, or load files by relative path. I cannot change the company scripts.
Are there ways to tell Python runtimes to use different working directories? I do not want to do cd ~/company_repo in my bash scripts.
cd ~/company_repo/ && python3.5 executable.py(cd... & python... )using the parantheses will not alter the current working dir of the bash scriptcd... & python...in a bash file and push it in one of folder in PATH, something like:cd $1 && python3 $2. If additional arguments for python is desired, maybe this can help: Process all arguments except the first one