<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#330033">
On 7/18/2011 2:13 PM, Vinay Sajip wrote:
<blockquote cite="mid:loom.20110718T230703-173@post.gmane.org"
type="cite">
<blockquote type="cite">
<pre wrap=""> The reason I thought it did nothing, is that I checked assoc (
=Python.File ) and ftype ( =c:\python32\python.exe "%1" %* ) both of
which look familiar, and neither of which mention py.exe which is
what I think the launcher is supposed to have been named; and
running c:\python32\python.exe from the command line produces a
Python that looks like 3.2.1 .
But somehow, running t32enc.py from the command line fails, and
loads 2.6.4 !
From what I've read about the launcher, I thought it was supposed to
take over the assoc and ftype and point Python.File to
c:\windows\system32\py.exe -- but that hasn't happened (and yes,
I've rebooted since doing the installs, so it is not just a leftover
CMD that didn't pick up new values).
So my question now is: how does the launcher really get activated
when invoking .py files from the command line, if the assoc and
ftype indicate that it should run c:\python32\python.exe (which when
I run by hand, seems to be what the name claims it to be)?
We don't need to create mysteries!
Glenn
</pre>
</blockquote>
<pre wrap="">The launcher's activation is done by the shell you're using, which does the
lookups in the registry.
Remember that there are two sets of locations - HKCU and HKLM - where the type
associations are potentially held. Please do a registry search (with
Administrator rights so you can search the whole registry) for "py.exe" or
"pyw.exe" and see if they show up anywhere at all. The launcher code tries to
add these keys in HKEY_CLASSES_ROOT, but I believe Windows can map this to HKCU
rather than HKLM if you don't have administrator access, at least on XP.
</pre>
</blockquote>
<br>
Thanks for the response, Vinay... you are the one that would know,
now that I've figured out it is a launcher issue rather than a
Python issue.<br>
<br>
Here is a list of py.exe references in my registry:<br>
<br>
HCR\Python.CompiledFile<br>
HCR\Python.File<br>
HCR\Python.NoConFile<br>
HCU\Software\Classes\Python.CompiledFile<br>
HCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.py\OpenWithListk<br>
HLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-21.....\Componer<br>
HLM\SOFTWARE\Wow6432Note\Microsoft\Windows\CurrentVersion\SharedDLLs<br>
HKU\S-1-5-21-.....\Software\Classes\Python.CompiledFile (and similar
corresponding to the above HCR ones)<br>
<br>
My (perhaps dated) understanding of the CMD commands attrib and
ftype is that they reflect the contents of HCR. But here
HCR\Python.File is different than the value displayed by the CMD
ftype Python.File. Why? What am I missing?<br>
<br>
</body>
</html>