Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #15913

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

From Dennis Lee Bieber <wlfraed@ix.netcom.com>
Subject Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7
Date 2011-11-18 10:04 -0800
Organization > Bestiaria Support Staff <
References (2 earlier) <ja47c6$bt2$2@dont-email.me> <4ec5a5cf$0$29967$c3e8da3$5496439d@news.astraweb.com> <ja4n7b$3fd$1@dont-email.me> <9in3r9F5j3U2@mid.individual.net> <ja5tlr$kem$1@dont-email.me>
Newsgroups comp.lang.python
Message-ID <mailman.2839.1321639508.27778.python-list@python.org> (permalink)

Show all headers | View raw


On Fri, 18 Nov 2011 07:29:56 -0800, "W. eWatson"
<wolftracks@invalid.com> declaimed the following in
gmane.comp.python.general:


> 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 you hit the "edit" button for each of those actions, it should
show you the ACTUAL application that performs that action.

	Duplicate that definition on Win7 (using the correct path to the
files if they are different).
 
> 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?

	"python.exe" should be the default for open -- that's how you get a
double-click on a file to actually RUN it. For script files, editing
should be a separate "edit with ..." action.

	And at this point, who cares why you don't see IDLE listed -- we've
been spending half the week trying to tell you HOW to add it.

	Since I had a registry corruption, I don't even have PYO and PYC
files listed, and PYW did not have an edit action. I've since added
"edit with Pythonwin" and, just for you, added an "edit with IDLE"
action. I did it the long way around, invoking the exe with IDLE as the
argument...

	So... once again...

-=-=-=-=-=-
Tools/File Options/File Types

For each of PY and PYW that don't have an edit action:
[New]

{give it a name -- note that I leave "open" to RUN the file only} 
edit with IDLE

{application used... change the path to match your installation; keep
the quotes} 
"E:\Python25\pythonw.exe" "E:\Python25\Lib\idlelib\idle.pyw" "%1"

{I don't know if the next are significant}
[X] Use DDE

{Application}
IDLE

{save the changes}
[OK]
[OK]
[Close]
-=-=-=-=-=-

	After doing the above, the <right-click> menu would show "edit with
IDLE" as a choice.

	I'd also suggest obtaining a copy of "Windows 7 Inside Out" --
though it appears to have skipped the detailed file type action
definitions (no wonder -- if my laptop with Win7 Home Premium is any
example, MicroSloth /removed/ the ability to add multiple actions --
there is NO "tools/file options/file types" visible. That leaves using
the registry editor to add the actions.

	My Win7 machine has the following entries (export from regedit):

-=-=-=-=-=-
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.py]
@="Python.File"
"Content Type"="text/plain"

[HKEY_CLASSES_ROOT\.pyw]
@="Python.NoConFile"
"Content Type"="text/plain"

HKEY_CLASSES_ROOT\Python.File]
@="Python File"

[HKEY_CLASSES_ROOT\Python.File\DefaultIcon]
@="C:\\Python27\\DLLs\\py.ico"

[HKEY_CLASSES_ROOT\Python.File\shell]

[HKEY_CLASSES_ROOT\Python.File\shell\EditWithPythonwin]
@="Edit with &Pythonwin"

[HKEY_CLASSES_ROOT\Python.File\shell\EditWithPythonwin\command]
@="\"C:\\PYTHON~1\\Lib\\SITE-P~1\\PYTHON~1\\PYTHON~1.EXE\" \"%1\" %*"

[HKEY_CLASSES_ROOT\Python.File\shell\open]
@="Open"

[HKEY_CLASSES_ROOT\Python.File\shell\open\command]
@="\"C:\\Python27\\python.exe\" \"%1\" %*"

[HKEY_CLASSES_ROOT\Python.NoConFile]
@="Python File (no console)"

[HKEY_CLASSES_ROOT\Python.NoConFile\DefaultIcon]
@="C:\\Python27\\DLLs\\py.ico"

[HKEY_CLASSES_ROOT\Python.NoConFile\shell]

[HKEY_CLASSES_ROOT\Python.NoConFile\shell\EditWithPythonwin]
@="Edit with &Pythonwin"

[HKEY_CLASSES_ROOT\Python.NoConFile\shell\EditWithPythonwin\command]
@="\"C:\\PYTHON~1\\Lib\\SITE-P~1\\PYTHON~1\\PYTHON~1.EXE\" \"%1\" %*"

[HKEY_CLASSES_ROOT\Python.NoConFile\shell\open]
@="Open"

[HKEY_CLASSES_ROOT\Python.NoConFile\shell\open\command]
@="\"C:\\Python27\\pythonw.exe\" \"%1\" %*"
-=-=-=-=-=-

	In contrast, my WinXP system shows (just for .PY, and with the above
add for IDLE):

-=-=-=-=-=-
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.py]
@="py_auto_file"

[HKEY_CLASSES_ROOT\.py\PersistentHandler]
@="{5e941d80-bf96-11cd-b579-08002b30bfeb}"

[HKEY_CLASSES_ROOT\py_auto_file]
@=""
"EditFlags"=dword:00000000
"BrowserFlags"=dword:00000008

[HKEY_CLASSES_ROOT\py_auto_file\shell]
@="open"

[HKEY_CLASSES_ROOT\py_auto_file\shell\edit]

[HKEY_CLASSES_ROOT\py_auto_file\shell\edit\command]
@="\"E:\\Python25\\Lib\\site-packages\\pythonwin\\Pythonwin.exe\"
\"%1\""

[HKEY_CLASSES_ROOT\py_auto_file\shell\edit_with_IDLE]
@="edit with IDLE"

[HKEY_CLASSES_ROOT\py_auto_file\shell\edit_with_IDLE\command]
@="\"E:\\Python25\\pythonw.exe\"
\"E:\\Python25\\Lib\\idlelib\\idle.pyw\" \"%1\""

[HKEY_CLASSES_ROOT\py_auto_file\shell\edit_with_IDLE\ddeexec]

[HKEY_CLASSES_ROOT\py_auto_file\shell\edit_with_IDLE\ddeexec\Application]
@="Idle"

[HKEY_CLASSES_ROOT\py_auto_file\shell\open]

[HKEY_CLASSES_ROOT\py_auto_file\shell\open\command]
@="\"E:\\Python25\\python.exe\" \"%1\" %*"
-=-=-=-=-=-


-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
        wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Both Python 2.5.2 and 2.7.2 flop the same way under Win 7 "W. eWatson" <wolftracks@invalid.com> - 2011-11-17 08:55 -0800
  Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7 ray <ray040123@gmail.com> - 2011-11-18 01:37 +0800
  Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7 "spartan.the" <spartan.the@gmail.com> - 2011-11-17 09:37 -0800
  Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7 John Gordon <gordon@panix.com> - 2011-11-17 17:39 +0000
    Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7 "W. eWatson" <wolftracks@invalid.com> - 2011-11-17 12:22 -0800
    Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7 "W. eWatson" <wolftracks@invalid.com> - 2011-11-17 12:31 -0800
      Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7 Chris Angelico <rosuav@gmail.com> - 2011-11-18 07:43 +1100
        Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7 Alan Meyer <ameyer2@yahoo.com> - 2011-11-21 17:43 -0500
      Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7 MRAB <python@mrabarnett.plus.com> - 2011-11-17 20:59 +0000
        Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7 "W. eWatson" <wolftracks@invalid.com> - 2011-11-17 16:00 -0800
      Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7 "spartan.the" <spartan.the@gmail.com> - 2011-11-17 12:46 -0800
        Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7 "W. eWatson" <wolftracks@invalid.com> - 2011-11-17 15:54 -0800
          Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7 "Martin P. Hellwig" <martin.hellwig@gmail.com> - 2011-11-18 01:55 +0000
      Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7 Dave Angel <d@davea.name> - 2011-11-17 22:59 -0500
        Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7 "W. eWatson" <wolftracks@invalid.com> - 2011-11-17 20:21 -0800
          Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7 Benjamin Kaplan <benjamin.kaplan@case.edu> - 2011-11-18 00:25 -0500
            Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7 "W. eWatson" <wolftracks@invalid.com> - 2011-11-18 09:59 -0800
              Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7 alex23 <wuwei23@gmail.com> - 2011-11-20 21:04 -0800
          Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7 alex23 <wuwei23@gmail.com> - 2011-11-17 22:06 -0800
        Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7 Tony the Tiger <tony@tiger.invalid> - 2011-11-18 15:46 -0600
  Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7 Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-11-17 18:42 +0000
  Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7 Terry Reedy <tjreedy@udel.edu> - 2011-11-17 17:12 -0500
    Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7 "W. eWatson" <wolftracks@invalid.com> - 2011-11-17 16:03 -0800
      Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7 Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-11-18 00:24 +0000
        Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7 "W. eWatson" <wolftracks@invalid.com> - 2011-11-17 20:33 -0800
          Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7 Neil Cerutti <neilc@norwich.edu> - 2011-11-18 13:11 +0000
            Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7 "W. eWatson" <wolftracks@invalid.com> - 2011-11-18 07:29 -0800
              Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7 MRAB <python@mrabarnett.plus.com> - 2011-11-18 17:12 +0000
                Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7 rusi <rustompmody@gmail.com> - 2011-11-18 09:19 -0800
                Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7 "W. eWatson" <wolftracks@invalid.com> - 2011-11-18 09:48 -0800
                Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7 "W. eWatson" <wolftracks@invalid.com> - 2011-11-18 09:45 -0800
                Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7 Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2011-11-18 17:17 -0800
              Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7 Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2011-11-18 10:04 -0800
      Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7 Terry Reedy <tjreedy@udel.edu> - 2011-11-18 02:35 -0500
        Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7 "W. eWatson" <wolftracks@invalid.com> - 2011-11-18 09:57 -0800
  Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7 alex23 <wuwei23@gmail.com> - 2011-11-17 19:04 -0800
    Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7 "W. eWatson" <wolftracks@invalid.com> - 2011-11-17 20:34 -0800
      Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7 Stephen Hansen <me+list/python@ixokai.io> - 2011-11-18 14:31 -0800
        Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7 alex23 <wuwei23@gmail.com> - 2011-11-20 21:09 -0800
  Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7 Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2011-11-17 20:34 -0800
    Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7 "W. eWatson" <wolftracks@invalid.com> - 2011-11-18 07:54 -0800
    Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7 "W. eWatson" <wolftracks@invalid.com> - 2011-11-18 07:57 -0800

csiph-web