<div dir="ltr">I don't think that's true:<div><br></div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 21, 2018 at 10:51 AM, Greg Ewing <span dir="ltr"><<a href="mailto:greg.ewing@canterbury.ac.nz" target="_blank">greg.ewing@canterbury.ac.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">Chris Billington wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
I wonder how mercurial gets around the fact that its own imports might be shadowed by whatever's in the current working directory.<br>
</blockquote>
<br></span>
The cwd is only added to sys.path in the interactive interpreter,<br>
not when you run "python something.py". So it's not usually a<br>
problem for applications implemented in Python.<span class="gmail-HOEnZb"><font color="#888888"><br>
<br></font></span></blockquote><div><br></div><div>I don't think that's true:</div><div><br></div><div>$ cd /tmp</div><div>$ echo 'import bar' > foo.py</div><div>$ echo 'print("this is bar")' > bar.py</div><div>$ python foo.py <br></div><div>this is bar </div><div><br></div><div>(<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">/tmp is not in the python path</span>)</div><div><br></div><div>-Chris</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-HOEnZb"><font color="#888888">
-- <br>
Greg</font></span><div class="gmail-HOEnZb"><div class="gmail-h5"><br>
______________________________<wbr>_________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org" target="_blank">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer" target="_blank">https://mail.python.org/mailma<wbr>n/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer" target="_blank">http://python.org/psf/codeofco<wbr>nduct/</a><br>
</div></div></blockquote></div><br></div></div>