开始编程之旅 翻译自Lee Harr的Start Programming

本文是使用pygsear+pygame作为开发环境,以初级用户角度来分步分阶段学习PYTHON基本概念,并以小游戏开发项目为具体案例,介绍的十分详细。编写风格清新朴实,没有象一般教科书那样枯燥,极其适合初级用户来激发兴趣时使用。

StartProgramming-0-3 工具Tools

Before you can start programming, you will need to gather some tools. This looks like a lot, but if you want to program, these are essential.

在你开始编写程序之前,你需要先收集一些工具。这看起来相当的多,但是下面这些是必需的。

计算机 Computer

comp.png

Your computer does not need to be the latest and greatest, but I do recommend that you run a programmer-friendly operating system like Linux or BSD. All of the examples in this book will run perfectly on Windows, MacOS, Linux and BSD.

你的计算机不必是最新的或者是最棒的,但是我建议你采用程序员的操作系统,比如Linux或者BSD。这本书上所有的示例都可以完美的运行在Windows,MacOS,Linux和BSD的操作系统上。

编译器或解释器 Compiler or Interpreter

PyBanner014.gif

There are hundreds of different programming languages available for computers these days. In this book we will start with Python (http://python.org/). The language is completely free and is available for a very wide range of computers and operating systems. Their website has excellent instructions on how to get it and install it on your computer.

目前在计算机上有上百种不同的编程语言。本书将以Python(http://python.org/)作为开始。这个编程语言可以完全自由的使用,并且适用于很多种类的计算机和操作系统。

编辑器Editor

editor.png

A text editor is different from a word processor. Do not try to edit your programs with Word. It is possible but it is tricky. Python comes with an editor called IDLE, but you may want to try other editors also. On unix-like systems, I recommend NEdit or Kate. On windows you might just want to go with notepad for now, but if you really get in to programming you will definitely want something much better. Some have recommended SciTE for windows. On MacOS, BBEditLite works quite well.

文本编辑器不同于文字处理程序。不要试图用word来编写你的程序。这可能会导致非常棘手的问题。Python使用的编辑器叫做IDLE,但是如果你想尝试其他的编辑器的话,在类unix平台下,我推荐NEdit 或者 Kate。在windows下面也许你会使用notepad(记事本),但是如果你想深入的研究编程的话,你一定会寻找其他更好的编辑器。很多人在windows下推荐使用 SciTE,在MacOS(苹果电脑)下, BBEditLite工作的也相当的好。

These next two are not essential to programming in general, but we will use them to help us get started:

下面这两个对于我们的编程不是必要的,但是我们打算用他们来帮助我们入门。

Pygame

pygame_tiny.gif

To make learning programming more fun, we will use graphics. Graphical programming is usually considered a more advanced topic, but with the proper tools it is not much harder, and it will help to make things more clear. Pygame (http://pygame.org/) is a set of python libraries which will need to be installed on your system to help with graphics.

为了使学习编程更加有趣,我们将采用图形界面。图形编程通常被认为是高级的题目,但是有了恰当的工具,它便不再困难了,并且能够帮助我们更清楚的了解编程。 Pygame (http://pygame.org/) 是一个需要安装在在图形界面基础上的Python函数库。

pygsear

pygsear_logo.png

As a supplement to Pygame, get the files I made to help people get started with programming. I call them pygsear (http://www.nongnu.org/pygsear/). Get the highest-numbered release from the download page in either .zip or .tar.gz whichever is easier for you to unpack. The file you need looks something like pygsear-0.52.tar.gz or pygsear-0.52.zip

作为Pygame的补充,我用这些文件来帮助人们学习编程。我叫他们 pygsear (http://www.nongnu.org/pygsear/)。从这里下载最新版本 the download page 的两种压缩包 .zip or .tar.gz 。解压缩对你来说应该比较容易。你也许会看到这样的文件 pygsear-0.52.tar.gz or pygsear-0.52.zip

StartProgramming-0-3 (last edited 2009-12-25 07:10:08 by localhost)