<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On 15 July 2013 15:32, Nick Coghlan <span dir="ltr"><<a href="mailto:ncoghlan@gmail.com" target="_blank">ncoghlan@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div id=":1wg" style="overflow:hidden">Most of the stuff Brett mentioned there shouldn't be relevant for a<br>
directly executed script - doing<br>
sys.path.remove(os.path.dirname(os.path.abspath(__file__)) should be<br>
pretty robust in any scenario.<br></div></blockquote><div><br></div><div style>OK, well apart from the shadowing issue, my initial tests have looked relatively positive. So the questions are now more around whether this is how we want to go with pip, what backward compatibility issues it may have (the launcher isn't available in Python < 3.3) etc. So I'll work up a pull request for discussion by the pip devs.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":1wg" style="overflow:hidden"><div class="im">
> I'm amazed actually that there's no way to say<br>
> "don't add the script location to sys.path", even as a command line option.<br>
> It seems like the sort of thing you'd want to make scripts robust, a bit<br>
> like -S and -E.<br>
<br>
</div>You'd think that, but then you'd look at getpath.c and run away (or<br>
write something like PEP 432, as I did) :P</div></blockquote></div><br>You're a better man than I, Gunga Din :-)</div><div class="gmail_extra"><br></div><div class="gmail_extra" style>Paul</div></div>