Python/Getting Started

From Jonathan Gardner's Tech Wiki
Jump to: navigation, search

Overview

This page is for those who are completely new to Python, and to programming perhaps.

Status

This was last reviewed September 2015. Email me if you want me to update it.

Which Version?

Use Python 3.4. See Python/Which Version Should I Use

What is Python?

If you're completely new to computer programming, then this is a critical section you need to read and understand.

Python is many things:

Programming Language
It's a language (much like French or German) that computers can understand. The things you say in this language are instructions that tell the computer what to do.
Compiler and Interpreter
It's a program that can take files containing text written in the Python language and turn it into a program that the computer can actually run.
Community
It's a group of people working together for a common goal. That goal is to write the best programs possibly as quickly as possible.
Philosophy
It's an idea about how programs should be put together and how they should run.

The Python you download from python.org is really just the second thing --- the compiler and interpreter. It's actually an *implementation* that we sometimes call CPython. At this moment, there are other implementations that do pretty much the same thing that CPython does. One of the most exciting projects is PyPy, a Python compiler and interpreter written entirely in Python. But there are others. Unless you have a good reason to learn another version, you should be using CPython.

How do I get started?

Here's the roadmap:

  1. Install Python.
  2. Get a Text Editor.
  3. Start a new project or find an existing one.
  4. Write some code. Test the code. Fix the code and test it againg until you are happy with your changes. (See Software Development)
  5. Distribute the code so others can use it.

Installing

Installation is a big task. It is simplest on Linux, but it is totally possible on MacOSX and Windows.

I detail the installation instructions for windows at Python/Installing/Windows. I try to list all the useful packages you might want and how to install them.

Get a Text Editor

Notepad isn't going to cut it. Take the time to invest in learning a Text Editor. I highly recommend ViM.

Starting a New Project / Finding an Existing One

I recommend signing up for Github. I'll walk through the steps of starting a new project at Python/Start New Project/Github on Windows

I cannot overemphasize the importance of finding a good project to work on. For starters, you're going to see the code that expert programmers write, but you'll also plug into a community of developers who will actually help you get better at programming.

Developing Code

There is a proven process that helps you actually write and deliver working code. It is more than writing code. It involves testing.

Distributing the Code

This is the critical step everyone misses. See Python/Distributing/Windows.

Need Help?

Email me or go participate in a Python emailing list or forum.

Wait a minute...

I want you to get started programming Python. So go get Python installed and go find a project to work on. That's right, now go.

When you're ready, let's go on to /Step 2