Idle no longer works

O

Opap-OJ

I can no longer open the Idle IDE for Python on Windows 7.

For 3-5 years I used Idle for all my python work. But in January this happens:

When I right click on a python file and choose "open with Idle" nothing happens.

If I double-click on the file itself, it briefly opens an MS-DOS looking window, then closes it immediately.

I tried installing Eclipse with PyDev. It opens the file, but will not run it in Python.

Any idea why?
 
B

Benjamin Kaplan

I can no longer open the Idle IDE for Python on Windows 7.

For 3-5 years I used Idle for all my python work. But in January this happens:

When I right click on a python file and choose "open with Idle" nothing happens.

If I double-click on the file itself, it briefly opens an MS-DOS looking window, then closes it immediately.

I tried installing Eclipse with PyDev. It opens the file, but will not run it in Python.

Any idea why?
--

Have you tried launching Python from the Command Prompt? Open up
command prompt and run C:\Python32\python.exe or whatever corresponds
to your version of Python.
 
T

Terry Reedy

I can no longer open the Idle IDE for Python on Windows 7.

For 3-5 years I used Idle for all my python work. But in January
this happens:

When I right click on a python file and choose "open with Idle"
nothing happens.

If I double-click on the file itself, it briefly opens an MS-DOS
looking window, then closes it immediately.

That should run the file and discard the output. Above is typical
Any idea why?

*Something* very specific to your system changed. Either registry
associations for .py are screwed, or your Python installation is
damaged. Easiest fix is to uninstall and re-install Python. But download
a more recent version first. Uninstall might not be needed, but makes
process more like to work.

In the regular interactive command prompt interpreter

import idlelib.idle

should start idle.
 
J

jussij

I can no longer open the Idle IDE for Python on Windows 7.
..
Any idea why?

It looks like your registry has changed.

To fix this just use the Windows Explorer, click on a Python file
and use the 'Open with, Choose default program' menu and then
select the Idle IDE as the default program.
 
D

Dennis Lee Bieber

It looks like your registry has changed.

To fix this just use the Windows Explorer, click on a Python file
and use the 'Open with, Choose default program' menu and then
select the Idle IDE as the default program.

That is probably the worst choice to make -- since what you've
defined means double clicking on ANY .py file will NOT RUN IT -- but
rather attempt to open it with the editor (IDLE)... But since IDLE
itself is a .py file, it may fail to start at all.

If double-clicking an IDLE.py file does not start it, then the
registry has lost the association of .py to python.exe, not to IDLE. OR
-- .py IS associated to python.exe but the association (the "run
command" is not passing the .py file name to the python executable).

On WinXP (with ActiveState 2.5.x version) my associations are as:

E:\UserData\Wulfraed\My Documents>assoc .py
..py=py_auto_file

E:\UserData\Wulfraed\My Documents>ftype py_auto_file
py_auto_file="E:\Python25\python.exe" "%1" %*

E:\UserData\Wulfraed\My Documents>

(with similar entries for .pyw to hook into pythonw.exe)
{Just booted the Win7 laptop with Python 2.7.x: The only real difference
is that it uses Python.File where the above has py_auto_file}
 
T

Terry Reedy

Most likely, or the Python installation has be damaged.
That is probably the worst choice to make -- since what you've
defined means double clicking on ANY .py file will NOT RUN IT -- but
rather attempt to open it with the editor (IDLE)... But since IDLE
itself is a .py file, it may fail to start at all.

If double-clicking an IDLE.py file does not start it, then the
registry has lost the association of .py to python.exe, not to IDLE. OR
-- .py IS associated to python.exe but the association (the "run
command" is not passing the .py file name to the python executable).

On WinXP (with ActiveState 2.5.x version) my associations are as:

E:\UserData\Wulfraed\My Documents>assoc .py
.py=py_auto_file

E:\UserData\Wulfraed\My Documents>ftype py_auto_file
py_auto_file="E:\Python25\python.exe" "%1" %*

E:\UserData\Wulfraed\My Documents>

(with similar entries for .pyw to hook into pythonw.exe)
{Just booted the Win7 laptop with Python 2.7.x: The only real difference
is that it uses Python.File where the above has py_auto_file}

Re-installing, as I suggested in the first response, is much easier,
especially for someone not familiar with the above.
 

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,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top