[Tutor] Trouble installing Python on Win7 (not a valid Win 32 app)
marc.tompkins at gmail.com
Wed Nov 16 01:09:13 CET 2011
On Tue, Nov 15, 2011 at 3:55 PM, Wayne Watson
<sierra_mtnview at sbcglobal.net>wrote:
> With fingers crossed ...
>> I'm going to try one last time before I give up:
>> - Go to Control Panel\Programs\Default Programs\Set Associations. DONE
>> - Highlight the line for ".py" DONE
>> - Click "Change program..." DONE
>> - In the "Open with" dialog, click the "Browse..." button. DONE
>> - In the "Open with..." dialog, navigate to C:\Python25\Lib\idlelib DONE
>> - Highlight "idle.bat" DONE
>> - Click the "Open" button. DONE
>> - You'll be back in the "Open with" dialog. DONE. Click OK. DONE
>> If you - yet again - do something other than what I've just described,
>> and then reply telling me that it didn't work, I will add you to my spam
> The .py entry shows idle.bat
> OK, take a deep breath. With a right-click on a py file "Open with",
> idle.bat shows as the first entry, then idle.pyw, Notepad, and finally
> python.exe. If I select either idle.bat or idle.pyw, I get a cmd window
> that show in the title: c:\windows\system32\cmd.exe and another "normal"
> window that says, "Windows cannot find idle.pyw. Make sure you typed the
> name correctly, then try again." Selecting idle.pyw, gives me a window that
> tells me the app I've tried to open in IDLE is not a valid Win32 app.
> I have no idea if the Dave Angel intervention had anything to do with this.
> I think we've exhausted ourselves. Time to ditch 2.5.2 and find a better
> version of Python to work on.
>> You asked about the %1 %2 %3 etc. in idle.bat. Yes, those are arguments.
>> From now on, when you double-click on a .py file,
>> - Windows will run idle.bat and pass it the name of your .py file as its
>> first (and only) argument.
>> - Idle.bat will then run pythonw.exe with "idle.pyw" as its first
>> argument, and the name of your .py file as its second argument.
>> - Python will then run IDLE with your .py file as its first argument.
>> I'm going to underscore this one more time, because you need to
>> understand it: Python is an interpreted/scripting language,
> Clearly that is so.
> and (except for specialty extensions like Pyrex) it does NOT compile into
>> standalone executables.*
> Again that is so.
> Windows cannot run Python code directly - Windows doesn't know what
>> Python is. When you double-click on a Python file and expect Windows to do
>> something with it, you have to tell Windows to open it with a program that
>> Windows actually
> Of course.
> CAN run directly - in this case, idle.bat. What you've been telling
>> Windows to do, by associating .py files with idle.pyw, is to open one file
>> it doesn't recognize by using another file it doesn't recognize. Don't do
> I started this very simply. I just installed 2.5.2, as we know both know,
> and made no changes to any associations. The install made them, not me.
> They only came up in this thread earlier. I may have made a mistake in
> doing so, but I have no idea where. Users should not have to go through the
> association process unless asked to do so. There was never a message to
> ask that. I've seen it on programs like Winamp, WinMediaPlayer,
> RealPlayer, but not here.
That's not entirely true, actually. See, the DEFAULT association for
Python files, as set by the installation, is just to run the damn things
using python.exe or pythonw.exe - NOT to edit them in IDLE. By default, if
you want to edit the script you right-click and select "Open in IDLE" (or
you use some other editor/IDE), but if you double-click it the script just
runs. What's messed with all of that is your insistence that you want IDLE
to be the default action. And there's nothing wrong with that either - but
you need to recognize that it is NOT the default setting, and plan
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor