<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#330033">
    On 7/20/2011 5:07 PM, Nick Coghlan wrote:
    <blockquote
cite="mid:CADiSq7daJUkyVLo=2SeYQnpOqkOG4HHwC+nPHhsBVZgOB7Mp0A@mail.gmail.com"
      type="cite">
      <pre wrap="">On Thu, Jul 21, 2011 at 8:51 AM, Ethan Furman <a class="moz-txt-link-rfc2396E" href="mailto:ethan@stoneleaf.us">&lt;ethan@stoneleaf.us&gt;</a> wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">I would say that would be a cool enhancement, as it could save a bit of
typing, but I think the launcher is quite useful even without path
traversal.
</pre>
      </blockquote>
      <pre wrap="">
Two related points:

1. Walking PATH isn't necessary, but the cwd of the py process should
be inherited from the shell correctly. If it is, then 'py foo.py'
shouldn't need path traversal, it should just look in the current
directory. Using PATHEXT to turn 'foo.py' directly into an executable
command on PATH from any directory is different and out of scope for
the launcher.</pre>
    </blockquote>
    <br>
    Sorry, I disagree that it is out of scope.  Looking in the current
    directory is fine, when the script is there, but my scripts are
    seldom in my data directories, and I want to run scripts (from the
    PATH) on data that is in the CWD.  I consider this a _very common_
    use case for using scripts/programs, but then if you want to use py
    from the command line to tweak which version of Python gets used to
    execute the script (if the default one didn't work, for example, and
    you want to try a different one), then suddenly, you have to find
    the path to the script, and specify it explicitly.<br>
    <br>
    <blockquote
cite="mid:CADiSq7daJUkyVLo=2SeYQnpOqkOG4HHwC+nPHhsBVZgOB7Mp0A@mail.gmail.com"
      type="cite">
      <pre wrap="">
2. The defined launched command line handling means that "py -m foo"
should also work, so long as the current directory is inherited
correctly.</pre>
    </blockquote>
    <br>
    Even if CWD is a data directory, and foo.py is somewhere on the
    path?<br>
    <br>
    <blockquote
cite="mid:CADiSq7daJUkyVLo=2SeYQnpOqkOG4HHwC+nPHhsBVZgOB7Mp0A@mail.gmail.com"
      type="cite">
      <pre wrap="">Cheers,
Nick.

</pre>
    </blockquote>
    <br>
  </body>
</html>