Your computer is the thing you are reading and typing on :) You should know a few things about it before we go much further.
Starting development work requires at least a passing familiarity with what is happening inside your machine, what software is installed, and where to look next for help!
Apple menu (upper left) > About This Mac
Know your OS and version number? Good!
A command line interface (CLI) is way of interacting with a computer by typing commands.
Many development tools don’t have graphic user interfaces–they only have command line interfaces.
Macs come with a command line interface included!
Start up a Terminal. You can find the Terminal application through Spotlight, or navigate to Applications/Utilities/Terminal. In your terminal, type:
bash --version
Output should look similar to:
$ bash --version GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0) Copyright (C) 2007 Free Software Foundation, Inc.
While Terminal is a full-featured utility, its default configuration is a bit poor for programming usage. Let’s configure Terminal to be a bit more friendly.
echo "export PS1='\[\e[0;33m\]\u\[\e[0;37m\]\[\e[0;36m\](\W)\[\e[0;0m\]\$ '" >> .bash_profile
- Highlight the Pro choice in the list on the left, and then click the Default button underneath
- Click the black block left of “Color” and drag the Opacity slider to the right (100%)
- Set the number of Rows to 40, under the Window Size section. Feel free to adjust taller or shorter to taste.
Done properly, your new terminal should look like this:
gedit is a cross-platform, syntax-highlighting text editor.
To write your code in! Word is a fine program, but it is not a text editor.
Python is a general purpose, dynamically-typed, strongly-typed, interpreted computer programming language.
Well, this is a Python programming workshop!
OS X comes with Python installed!
Start up a Terminal. You can find the Terminal application through Spotlight, or navigate to /Applications/Utilities/Terminal
Test your Python install at the command prompt. Type python and hit enter. You should see something like:
Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
Type exit() to return to your terminal/shell. Don’t worry if your version is different than the one shown here. Any 2.x series python 2.5 or higher (i.e., 2.5, 2.6, 2.7) should be fine!