On Unix, I can run Python scripts from the command line like this1:
The setting of
PYTHONPATH affects the run-time value of the
sys.path variable, which is Python's equivalent of Mathematica's
% PYTHONPATH=/foo:/bar:/baz python -c 'import sys; print sys.path[1:4]' ['/foo', '/bar', '/baz']
Is there a similar way to modify the value of the
$Path variable from the command line when invoking WolframScripts?
1 Of course, I can omit the
PYTHONPATH=lib/python "prefix" by first running
export PYTHONPATH=/absolute/path/to/lib/python. The form with the "prefix", however, gives me the flexibility to tailor the library path to the script, something I often find useful.