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.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor