On 2015-10-18 10:26, Alan Gauld wrote:
On 18/10/15 16:33, Alex Kleider wrote:

How does one arrange so "the top level directory _can_ be found within
Python's path."?

Is the answer to include the following at the beginning of each file?

if not 'path/to/top/level/package/directory' in sys.path:
     sys.path.append('path/to/top/level/package/directory')

You could, but you can also add it to your PYTHONPATH environment variable.

It seems to not exist:
(venv)alex@x301:~/Py/CSV/debk$ echo $PYTHONPATH

Should I add the following to the end of my ~/.bashrc file?
export PYTHONPATH="$PYTHONPATH:/home/alex/Py"

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to