Skip to content

Latest commit

 

History

History
61 lines (38 loc) · 1.95 KB

USING_IDLE.md

File metadata and controls

61 lines (38 loc) · 1.95 KB

Opening IDLE

Once the Anaconda Python distribution is installed, you should have access to the editor, IDLE. To open IDLE...

Mac

  • Open a Terminal. You can do this by going to Searchlight and starting to type "terminal".

  • Once the terminal opens, then type

    idle3

Or...

  • Click on the Spotlight icon (the magnifying glass) in the upper right of your screen.
  • Start typing "idle" in the search window.
  • Double-click on the appropriate icon.

Windows

  • Launch "Anaconda Prompt"
  • At the prompt (flashing cursor) type "idle"

Or..... (these might not work)

  • Press the "Windows key" and "r" at the same time (or search computer for "run")
  • In the "Run" window type: "cmd" (no quotes)
  • When Command Prompt comes up, type: "start idle"

Or...

  • Click on the Windows Start button (lower left on many computers)
  • In the "Search" window bar (at the bottom) start typing "idle"
  • Click on the appropriate search result, either "IDLE" or "IDLE (Python GUI)"

Using IDLE

When IDLE is first opened, you have access to the Python interpreter. That is, everything you type is exectuted a Python in an interactive environment.

>>> x = 10
>>> print x
10

To open a file (Python script) do

File --> Open

To save a file do

File --> Save or just Ctrl-s

To run/execute the script do

Run --> Run Module or just F5 (or fn-F5 on Mac)

For most of this class we will be using IDLE as a text editor: we will use it to actuall write and edit our code.

IDLE, like most text editors, has a nice syntax highlighting feature that recognizes that we are writing Python and so highlights and formats words and phrases to draw a distinction between different parts of your code.

IDLE is not a programming language and is not the same as Python. IDLE is similar to a word processor in that you can use it write whatever you want in any language if you wanted.