How do you permanently change the JYTHONPATH in Jython 2.5 on Ubuntu 14?

452 views Asked by At

I'm using Ubuntu 14.04 LTS and Jython 2.5.3. I want to add a directory to the path Jython takes to search for Python packages. When I import sys and enter sys.path, here's what I get:

>>> sys.path
['', '/usr/lib/site-python', '/usr/share/jython/Lib', '/usr/Lib', '__classpath__', '__pyclasspath__/']

I want to add the directory '/foo/bar' at the beginning of the list.

1

There are 1 answers

1
nicholsonjf On

I was able to accomplish this by adding the following line to my user bashrc file (~/.bashrc):

export JYTHONPATH=/foo/bar:/usr/lib/site-python:/usr/share/jython/Lib