Set pythonpath from script at boot time
Hi, under Debian, I need to add some paths to the PYTHONPATH environment variable for all users, including root. I want to do this because I have a custom sh script in /etc/init.d that runs a couple of python scripts needing the new pythonpath. The problem is that whatever I try only alters PYTHONPATH in the context of an open shell. No way to do this during startup.
I've tried exporting the new PYTHONPATH from the sh script as follows:
export PYTHONPATH="$PYTHONPATH:/new/path/"
and also running a new Python script that calls sys.path.append
but nothing works.
Thanks in advance for your ideas!
|