This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Idle crashes when opening file
Type: crash Stage: resolved
Components: IDLE Versions: Python 2.7
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: Jerry.Barrington, Schiefna, ned.deily
Priority: normal Keywords:

Created on 2013-11-03 14:52 by Schiefna, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (7)
msg202027 - (view) Author: Annika Schiefner (Schiefna) Date: 2013-11-03 14:52
Whenever I try opening a .py file, Idle crashes. 
Mac OS X, 10.6.8
msg202051 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2013-11-03 18:50
OS X 10.6 Snow Leopard shipped with a new version of Tk 8.5 that is mostly unusable with IDLE and other Tkinter applications.  If you are using the Apple-supplied system Python on OS X, you should install a new version of Python that allows use of a different version of Tk.  If you are using a installer, install a third-party version of Tk or the latest installers which include their own built-in copies of Tk.  See for detailed information.  If this does not solve your problem, please reopen this issue and supply more information.
msg202055 - (view) Author: Jerry Barrington (Jerry.Barrington) Date: 2013-11-03 20:35
I installed python-2.7.6rc1-macosx10.6_rev1.dmg, which says it has it's own Tk builtin, on OSX 10.6.8.  Idle crashes when I double-click a *.py file.  If I try to open a file from within Idle, a blank window opens that I can't close.
msg202056 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2013-11-03 20:41
Double-clicking on a .py may not be opening the file with the right version of IDLE.  OS X maintains the associations between file types, based on file characteristics like the extension (e.g. ".py"), and applications.  To select exactly which application to open a file, rather than double-clicking on it, click on it once to select it then use control-click to being up a context menu and use "Open With" to select the 2.7.6 version of IDLE.  You can also use the Finder's Get Info command to change application associations for a particular file or for all files of a particular type.  The details of all of this vary slightly depending on OS X release.
msg202057 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2013-11-03 20:45
My apologies! What I just wrote is accurate but not the problem you are seeing. I forgot that there is a problem with IDLE's Open command that was discovered after the release of 2.7.6rc1.  See Issue19426  It will be fixed in the final release of 2.7.6 which should be available sometime this week.
msg202062 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2013-11-03 21:27
P.S. If you feel comfortable with using the command line, you *could* install the fix for Issue19426 yourself into 2.7.6rc1 if you can't wait for the final release.  For the OS X installers, something like this should work from a user login with administrator privileges (sudo may ask for your password):

cd ~/Downloads
curl -O
cd /Library/Frameworks/Python.framework/Versions/2.7
cd ./lib/python2.7/idlelib
diff ~/Downloads/ ./
sudo cp -p ./ ./
sudo cp ~/Downloads/ ./
sudo rm -f ./IOBinding.pyc ./IOBinding.pyo
sudo chmod 664 ./

The output from the diff command should look like this:

$ diff ~/Downloads/
<     lst = str.split("\n", 2)[:2]
>     str = str.split("\n", 2)[:2]
msg202078 - (view) Author: Jerry Barrington (Jerry.Barrington) Date: 2013-11-04 03:23
Thank you, that fix worked perfectly.

Only one weird thing.  I have IDLE's preferences set to "At Startup: Open Shell Window".  If I double click a *.py file while IDLE isn't running, the shell pops up, then the py file pops up, then the shell goes away.  Not a problem, but kind of weird behavior.
Date User Action Args
2022-04-11 14:57:53adminsetgithub: 63683
2013-11-04 03:23:18Jerry.Barringtonsetmessages: + msg202078
2013-11-03 21:27:05ned.deilysetmessages: + msg202062
2013-11-03 20:45:58ned.deilysetmessages: + msg202057
2013-11-03 20:41:44ned.deilysetmessages: + msg202056
2013-11-03 20:35:10Jerry.Barringtonsetnosy: + Jerry.Barrington
messages: + msg202055
2013-11-03 18:50:51ned.deilysetstatus: open -> closed

nosy: + ned.deily
messages: + msg202051

resolution: out of date
stage: resolved
2013-11-03 14:52:54Schiefnacreate