IDLE lost from Windows menu !

U

Uncle Ben

I have lost the convenient feature that to edit a .py file I could
right-click on the file name and reach the menu item "Edit with IDLE".

The workaround is not hard, but it wouild be nice to get this feature
back.

It happened when I was mungeing around and downloaded Python 2.3.3 in
addition to Python 2.71, and got into trojuble uintil I discovered
that I was involuntarily RUNNING the older version. So I cleaned it
out, but still I have this aftermath.

Is there a Windows guru out there who can tell be how to add to the
right-click menu clicking on myfile.py?

Uncle Ben
 
A

Alec Taylor

Search for the following key in regedit: HKEY_CLASSES_ROOT\*\shell

Right click on “shell”, choose create new key.

Name it “Edit with IDLE"

Create a new key below that one and call it “command.”

Now double click on the (Default) value that you will find in the
right hand pane, and type in the following: python.exe %1

(or if you don't have it in your PATH, then put in the absolute python
directory, ie: C:\Python27\bin\python.exe)
 
U

Uncle Ben

I have lost the convenient feature that to edit a .py file I could
right-click on the file name and reach the menu item "Edit with IDLE".

The workaround is not hard, but it wouild be nice to get this feature
back.

It happened when I was mungeing around and downloaded Python 2.3.3 in
addition to Python 2.7.1, and got into trouble until I discovered
that I was involuntarily RUNNING the older version.  So I cleaned it
out, but still I have this aftermath.

Is there a Windows guru out there who can tell be how to add to the
right-click menu clicking on myfile.py?

Uncle Ben

It was suggested to me privately that I search for
HKEY_CLASSES_ROOT\*\shell,
right_click on "shell",
create a new key called "EDIT with IDLE"
and another called "command python.exe %1"

Problem:
Searching on the HKEY group as above yields no "shell".

Did I not do it right, or is there another way?

(I would think that that command would execute my file, not edit it.
But maybe I will be surprised.)

(I am running Windows 7, 64-bit.)

Uncle Ben
 
M

MRAB

It was suggested to me privately that I search for
HKEY_CLASSES_ROOT\*\shell,
right_click on "shell",
create a new key called "EDIT with IDLE"
and another called "command python.exe %1"

Problem:
Searching on the HKEY group as above yields no "shell".

Did I not do it right, or is there another way?

(I would think that that command would execute my file, not edit it.
But maybe I will be surprised.)

(I am running Windows 7, 64-bit.)
Probably the simplest solution would be to install the appropriate
version of Python again.
 
U

Uncle Ben

Probably the simplest solution would be to install the appropriate
version of Python again.- Hide quoted text -

- Show quoted text -

Tried that. No change. Strange things are happening!
 
A

Andrew Berg

It was suggested to me privately that I search for
HKEY_CLASSES_ROOT\*\shell,
right_click on "shell",
create a new key called "EDIT with IDLE"
and another called "command python.exe %1"
The key you're looking for is HKCR\Python.File\shell. Add a subkey
called Edit with IDLE. Create a subkey in there called command. Inside
HKCR\Python.File\shell\Edit with IDLE\command, modify the default value
to "C:\Python32\pythonw.exe" "C:\Python32\Lib\idlelib\idle.pyw" -e "%1"
(changing the paths if necessary). Do the same with
HKCR\Python.NoConFile\shell to get the command for .pyw files.
 
T

Terry Reedy

I have lost the convenient feature that to edit a .py file I could
right-click on the file name and reach the menu item "Edit with IDLE".

The workaround is not hard, but it wouild be nice to get this feature
back.

It happened when I was mungeing around and downloaded Python 2.3.3 in
addition to Python 2.71, and got into trojuble uintil I discovered
that I was involuntarily RUNNING the older version. So I cleaned it
out, but still I have this aftermath.

Is there a Windows guru out there who can tell be how to add to the
right-click menu clicking on myfile.py?

In Window98, one could get from Explorer Window to a file-associations
dialog/window/tool that would let you change/add 'open', 'open with x',
'run', for a particular file type without using the registry editor,
which is slightly dangerous. I have forgotten how to find it in xp, and
no idea in w7. I would look in windows help and or control panel.
 
U

Uncle Ben

It was suggested to me privately that I search for
HKEY_CLASSES_ROOT\*\shell,
right_click on "shell",
create a new key called "EDIT with IDLE"
and another called "command python.exe %1"

Problem:
  Searching on the HKEY group as above yields no "shell".

Did I not do it right, or is there another way?

(I would think that that command would execute my file, not edit it.
But maybe I will be surprised.)

(I am running Windows 7, 64-bit.)

Uncle Ben

Thanks to all for good help. I finally got what I need by altering
the original advice (A.W.) slightly.

The key to edit was "HKCR/Applications/python.exe/shell",
the item is put into the menu in a sub-key labelled "Edit with IDLE",
and the command sub-sub-key that works for me is "idle.bat %1"

I will keep Andrew Berg's note and use it when I encounter .pyw files.

Python's the ninth language I've had to learn. And I love it.

Uncle Ben
 
U

Uncle Ben

On 2011.04.28 02:11 PM, Uncle Ben wrote:> It was suggested to me privately that I search for

The key you're looking for is HKCR\Python.File\shell. Add a subkey
called Edit with IDLE. Create a subkey in there called command. Inside
HKCR\Python.File\shell\Edit with IDLE\command, modify the default value
to "C:\Python32\pythonw.exe" "C:\Python32\Lib\idlelib\idle.pyw" -e "%1"
(changing the paths if necessary). Do the same with
HKCR\Python.NoConFile\shell to get the command for .pyw files.

Thanks to all for good help. I finally got what I need by altering
the original advice (A.T.) slightly.

The key to edit was "HKCR/Applications/python.exe/shell",
the item is put into the menu in a sub-key labelled "Edit with IDLE",
and the command sub-sub-key that works for me is "idle.bat %1"

I will keep Andrew Berg's note and use it when I encounter .pyw
files.

Python's the ninth language I've had to learn. And I love it.

Uncle Ben
 
C

c.fangeux

Thanks Alec.

For me it works with the following Default key :

"C:\Python32\pythonw.exe" "C:\Python32\Lib\idlelib\idle.pyw" -e "%1"

Otherwise IDLE does not open, only python was executed.
 
C

c.fangeux

Thanks Alec.

For me it works with the following Default key :

"C:\Python32\pythonw.exe" "C:\Python32\Lib\idlelib\idle.pyw" -e "%1"

Otherwise IDLE does not open, only python was executed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top