A Beginner's Python Tutorial

When CivilizationTM IV (Firaxis Games, published by Take2) was announced, one of the most exciting features was that much of the scripting code will be in python, and the game data in XML. This tutorial attempts to teach you the basics of python programming that you could use with civIV.

Of course, this tutorial is not limited to those who want to play a slow-paced turn-based strategy game. That is what it was written for, but is perfectly useful to any person with no programming knowledge at all, who wants to learn python. But what makes this tutorial unique, is that it is written for beginners, by a beginner.

Table 1 - Lessons
Number Name

Lesson 1

Installing Python

Lesson 2

Very Simple Programs

Lesson 3

Variables, and Programs in a Script

Lesson 4

Loops and Conditionals

Lesson 5

Functions

Lesson 6

Tuples, Lists, and Dictionaries

Lesson 7

The for loop

Lesson 8

Classes

Lesson 9

Importing Modules

Lesson 10

File I/O

Lesson 11

Error Handling

Then we also have the (to be written) Civilization IV python introduction. It will begin its release in early November.

Table 2 - Lessons
Number Name

Lesson 1

Introduction to Civilization IV python (not released yet)

Fork me on GitHub