<div dir="ltr">On Tue, Sep 10, 2013 at 11:16 PM, Ned Deily <span dir="ltr"><<a href="mailto:nad@acm.org" target="_blank">nad@acm.org</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The behavior is the result of a feature added in 2.7 for Issue4865 which<br>
appends the site-packages directory for the Apple-supplied system Python<br>
to sys.path of a Python framework build.  With hindsight, I don't think<br>
this was a good idea and you are not the first to complain about it<br>
(see, for instance, Issue15048).</blockquote><div><br></div><div>Wow, okay.<br><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">  It is late in the game to make a change like<br>

this in Python 2.7.x which is nearing the end of its supported life.<br>
It's not too late, IMO, to change current Python 3 before it becomes an<br>
issue;  it's not an issue yet because Apple has not yet shipped anything<br>
newer than Python 2.7.x.  Feel free to chime in on the bug tracker.<br></blockquote><div><br></div><div>Unfortunately I am stuck with 2.7.x for the indefinite future, but since we already maintain our own minor patches to the Python sources, I do not mind adjusting this myself.<br>
</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The path appends occur in the standard library "site" module.  You could<br>
patch it in your own interpreter to not include /Library/Python; you<br>
might be also be able to do it by supplying a "sitecustomize" module.<br>
See site.py for details.<br></blockquote><div><br></div><div>Excellent, I'll try this.  Modifying sys.path on the fly as Chris suggests is possible as well, although the PYTHONPATH erasure is actually handled by shell scripts which actually launch the programs.<br>
<br>thanks,<br>Nat<br></div></div></div></div>