<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#330033">
On 7/20/2011 2:43 PM, Glenn Linderman wrote:
<blockquote cite="mid:4E274C0F.40400@g.nevcal.com" type="cite">
<blockquote cite="mid:loom.20110720T160430-209@post.gmane.org"
type="cite">
<pre wrap="">It's not py's job to walk the path: the shell does that when you just type
"foo". It locates foo.py, and then invokes py because of file association - py
then checks the file for a shebang to decide which Python to dispatch it to.</pre>
</blockquote>
<br>
Certainly when the launcher is invoked via an association, this
would be the case. However, when the launcher is invoked via the
command line, then the unqualified name is passed through. To be
useful from the command line, the launcher should walk the PATH to
find the .py file.</blockquote>
<br>
The Windows SearchPath API
<a class="moz-txt-link-rfc2396E" href="http://msdn.microsoft.com/en-us/library/aa365527%28v=VS.85%29.aspx">&lt;http://msdn.microsoft.com/en-us/library/aa365527%28v=VS.85%29.aspx&gt;</a>
makes it a pretty easy job to walk the PATH. Would even allow low
cost additional feature of searching for both foo and foo.py at
the same time.<br>
</body>
</html>

AltStyle によって変換されたページ (->オリジナル) /