Both Python 2.5.2 and 2.7.2 flop the same way under Win 7

W. eWatson wolftracks at invalid.com
Fri Nov 18 12:48:54 EST 2011


On 11/18/2011 9:19 AM, rusi wrote:
> On Nov 18, 10:12 pm, MRAB<pyt... at mrabarnett.plus.com>  wrote:
>> On 18/11/2011 15:29, W. eWatson wrote:
>>
>>
>>
>>
>>
>>
>>
>>> On 11/18/2011 5:11 AM, Neil Cerutti wrote:
>>>> On 2011-11-18, W. eWatson<wolftra... at invalid.com>  wrote:
>>>>> On 11/17/2011 4:24 PM, Steven D'Aprano wrote:
>>>>>> On Thu, 17 Nov 2011 16:03:14 -0800, W. eWatson wrote:
>>
>>>>>>> I have not found any successful way to get to IDLE. It's on on the
>>>>>>> right-click of a py menu, and, if I go the ...lib/idle.pyw, it fails
>>>>>>> with a "invalid Win32 app" msg.
>>
>>>>>> If you associate .pyw files with pythonw.exe, and then open idle.pyw,
>>>>>> does it work?
>>
>>>>>> Failing that, go to your laptop where the associations are right,
>>>>>> and see
>>>>>> what they are, then duplicate the settings on your Windows 7 machine.
>>
>>>>> Sounds like a good idea except I've not used associations in so
>>>>> long under XP, I have no idea where to start. Control Panel. My
>>>>> Computer Tools?
>>
>>>> Open Windows Explorer.
>>>> With the menu, to to Tools->Folder Options
>>>> Click the File Types tab in the Folder Options menu.
>>
>>>> There will be an upper view with registered filed types, and some
>>>> buttons below far making changes to them.
>>
>>> OK, I've found that. I see
>>> Py
>>> Pyc
>>> Pyo
>>> Pyw
>>> If I click on each, it basically it gives a short description of each.
>>> If I click advanced, there's more info. For example for py, Actions are
>>> IDLE and Open.
>>
>>> What does this tell me that's relevant to Win7?
>>
>>> If on Win7, I go to Default Programs I see under associations various
>>> python items. Py shows Unknown application. Since installing 2.7.2 I
>>> have not messed with these associations. If I right-click on Unknown, I
>>> see Notepad and python.exe for choices to open the file. I want neither.
>>> Why isn't IDLE listed there?
>>
>>> If I right-click on junk.py, I see "Open with". Notepad and python.exe
>>> are choices. However, that menu allows me to choose something else. For
>>> example, Adobe Reader, or Internet Explorer. I suppose the next question
>>> is should I use the browse there and try to connect to IDLE in
>>> ...\Lib\idlelib? My guess is that if I do, I will run into the "invalid
>>> Win32 app", when I try to use it.
>>
>> You can't associate .py with Idle because Idle is a Python script, not
>> an executable (an .exe).
>>
>> Have a look here:http://superuser.com/questions/68852/change-windows-7-explorer-edit-c...
>>
>> In my PC's registry (Windows XP, but Windows 7 should be similar or the
>> same) it has the entry:
>>
>> Key: HKEY_CLASSES_ROOT\Python.File\shell\Edit with IDLE\command
>> Value: "C:\Python31\pythonw.exe" "C:\Python31\Lib\idlelib\idle.pyw" -n
>> -e "%1"
>>
>> Note how it actually associates the Edit action of Python files with an
>> .exe file.
>
> The tools ->  folder options approach is the user-friendly approach --
> when it works.
> The 'Correct the registry' is the muscular approach -- it will set
> right everything iff you are a wizard.
>
> In between the two is assoc and ftype see
> http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ftype.mspx?mfr=true
> http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/assoc.mspx?mfr=true
These two seem equally muscular. I shudder to think where these choices 
might lead me.



More information about the Python-list mailing list