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

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

StartProgramming-0-4 场所Place

This could mean a quiet workspace, where no one will be constantly interrupting you while you are trying to think. That is important, as programming will require some thinking.

这就意味着需要一个安静的环境,没有人能够总是打断你的思路。这是非常重要的,编程需要一定的思考。

new_zen.png

Perhaps even more important is a computer workspace -- some safe place to store your files where no one else will accidentally delete them -- someplace where you can organize things the way it makes sense to you.

也许更加重要的是你的计算机环境 —— 一个没有其他人能够偶然删除文件的安全区域 —— 一些能够组织你思路的地方,这对你是有意义的。

Create a folder to work in. Inside of that folder, unpack the pygsear library file you downloaded. That should create a new folder called something like pygsear-0.47

建立一个工作文件夹,把下载的 pygsear 函数库解压到这里。这会产生一个pygsear-0.47的新文件夹

测试编程环境Test the Environment:

Just to see if everything is working ok, try to run the test program. It should be as easy as clicking on the test.py program in the pygsear folder.

看起来一切都工作的很好,现在尝试运行测试程序。只要在 pygsear文件夹中简单的双击 test.py这个程序。

If that does not work, you may need to open up a console (text terminal) window, change in to the unpacked pygsear directory, and type:

如果他不能够运行,你可以打开一个控制台窗口,切换到pygsear目录中,然后按下:

python test.py

Next, make sure you can invoke your editor on the files in this directory, and save them here too. If everything is working, we are ready to start programming!

接下来,确保你在这个目录下能调用你的编辑器,并且在这里保存他们。如果一切正常,我们就准备开始编程啦!

pig.png

它没有运行It's Not Working!

If something is not working right -- either the test program is not starting, or you cannot figure out how to use the text editor -- you may need to ask someone with more experience to help you get set up this first time. When you get someone to help you, watch what they do and ask questions if you do not understand!

如果它没有正常运行,或者是测试程序没有运行,或者你不了解如何使用编辑器,你可以去找有经验的人帮助你完成最初的设置。如果你找到某人帮你,看看他是怎样做的并且问他你不明白的问题。

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