On 27 May 2014, at 16:17, Roel Bruggink <r...@fourdigits.nl> wrote: > PYTHONPATH is een environ var en kan gebruikt worden om sys.path aan te > vullen. > Beter gezegd, te pre-penden. > > Normaal gesproken gebruik je dit niet en installeer je eggs in je virtualenv, > of je gebruikt zc.buildout of een combinatie van beide. > > Voorbeeld: > > roel@spoon.local > ❯ python -c 'import sys; print sys.path' > ['', > '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', > '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', > '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', > > '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', > > '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', > > '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', > > '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', > > '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', > > '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages', > '/Library/Python/2.7/site-packages'] > > roel@spoon.local > ❯ PYTHONPATH=/henk python -c 'import sys; print sys.path' > ['', '/henk', > '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', > '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', > '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', > > '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', > > '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', > > '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', > > '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', > > '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', > > '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages', > '/Library/Python/2.7/site-packages'] > > > Zie ook http://www.stereoplex.com/blog/understanding-imports-and-pythonpathen > https://docs.python.org/2/using/cmdline.html#envvar-PYTHONPATH >
Dat heb ik allemaal wel begrepen. Ook de werking en dat je er zelf dingen aan toe kunt voegen en alles. Wat ik niet kan thuisbrengen is hoe die /System en /Library entries opduiken. En op die plek. (En hoe ik ze weer weg kan krijgen) .F _______________________________________________ Python-nl mailing list Python-nl@python.org https://mail.python.org/mailman/listinfo/python-nl