PyCon intro tutorial prep/OSX text editor

From OpenHatch wiki
Jump to navigation Jump to search

Quill.png

Installing TextWrangler[edit]

On OSX, a good text editor is TextWrangler.

To download and install TextWrangler:

To run TextWrangler:

  • Double-click the TextWrangler icon from your Dock.

Configure TextWrangler to indent with spaces[edit]

  • Start up TextWrangler, and click TextWrangler -> Preferences -> Editor Defaults.
  • Check the "Auto-expand tabs" checkbox.
  • Make sure the "Tab width" is set to 4 in the box below.
  • Restart TextWrangler for change to take place.

That's it! Now, you can press Tab to indent your code, and that indentation will actually be made of spaces. We do this because Python doesn't like it when we mix tabs and spaces.

Success![edit]

Now you have an editor that you can use to open any text file, including Python programs.

Champagne.pngParty.png

« Back to the main prep page