Wednesday, June 26, 2013

[ Level 1 ] Assign external python path to program.

Sometimes, you want to assign external python path to program, then you could use "PYTHONPATH" environment variables for this purpose. ex.
$ PYTHONPATH=/tmp/my_python_path python - <<EOF
> import sys
> print sys.path
> EOF
['', '/tmp/my_python_path', '/usr/lib/python2.7', ...]
$
Wish this helps.

regards,

Stanley Huang