how do I launch IDLE, the development environment

2019-01-31 00:20发布

I am running python 2.7.1. I can't figure out how to launch the IDLE IDE. I am told it comes already installed with python, but I can't find it using spotlight.

9条回答
Anthone
2楼-- · 2019-01-31 00:47

The answer of Matthewm1970 works like a charm! And if you add an & to your shell command, the automation script will end immediately. There is no spinning gear. Like so:

/usr/local/bin/idle3.5&

Note the ampersand.

Cheers.

-melle

查看更多
萌系小妹纸
3楼-- · 2019-01-31 00:51
  1. first to launch the terminal CMD+space
  2. second to input idle3
  3. the idle will be activated automatically.
查看更多
女痞
4楼-- · 2019-01-31 00:52

One way to run IDLE from spotlight or an icon in the Applications folder is to build a quick Automation for it. As mentioned by other commentators, this probably isn't necessary for Python 3, as it creates a shortcut automatically, and some hand-installed versions have tools to do this automatically. But if you want to roll your own:

  1. You'll need to know the terminal command to open your version of IDLE. On my Mac right now (early 2016), running python 2.7.10, it is "idle2.7"
  2. Using spotlight, or in the Utilities folder, open "Automator"
  3. Choose an "Application" type document.
  4. Make sure "Actions" is selected in the gray bar, upper left.
  5. In the actions column, find "Run Shell Script" and double-click it, or drag it to the workflow area on the right.
  6. Enter the terminal command in the parameters box that appears.
  7. Save your automation (I called mine "IDLE" and put it in the Applications folder, to make it easy).
  8. It's now available (as soon as spotlight indexes it) via all the normal methods. The only side-effect will be that while it's running, your menu bar will have a spinning gear over in the tray area next to the clock. This indicates an automation workflow is running. Once you close IDLE, it will go away.
查看更多
登录 后发表回答