Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I can open IDLE.

After opening IDLE, I can do File > Open > some_file.py just fine.

When IDLE is open, I can also just double-click on any .py files in Finder and they will open in IDLE.

From the Terminal, whether IDLE is already open or not, I can type idle -e some_file.py and open a .py file just fine that way.

However, when IDLE is not already open, if I double-click on .py files in Finder, nothing happens. If I right-click > Open with > IDLE in Finder, nothing happens. For some reason, it appears I cannot launch IDLE by opening .py files in Finder.

I'm using OSX 10.8.2, Python 2.7.3. Any ideas?

share|improve this question
    
That's because it assumes you're wanting to run the script instead of edit it. –  KronoS May 15 at 17:47

1 Answer 1

However, when IDLE is not already open, if I double-click on .py files in Finder, nothing happens.

That's probably not true. The default action of any .py file is to run it as a script. That's the same for any machine (linux, mac, windows). You'll need to change it's default action by following these instructions:

  1. Right click file
  2. Select "Get Info"
  3. Change the default "Open With" Application to IDLE

Note: By doing this, if you have any scripts that you want to run by double clicking on them, you'll no longer be able to do so.

share|improve this answer
    
This is not the issue. As I mentioned in the OP, when IDLE is open, I can just double-click on any .py files in Finder and they will open in IDLE. Also if I right-click on a .py file and go to "Open with", the default is IDLE. Also if I follow your instructions the default "Open with" application is already set to IDLE. –  GChorn May 19 at 4:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.