官术网_书友最值得收藏!

Chapter 1. Start your Engines

In this chapter, we will cover:

  • The Shortest Python Program
  • Ensure the Python Modules are present
  • A Basic Python GUI in Tkinter
  • Make a Compiled Executable under Linux
  • Make a Compiled Executable under MS Windows

Introduction

This book is a collection of code recipes for creating and animating graphic objects using the marvelous Python language. In order to create and manipulate graphic objects, Python makes use of the Tkinter module. The prerequisite for using Python and Tkinter is obviously to have both installed. Both are free and Open Source and instructions for obtaining and installing them are abundantly available on the web. Just Google phrases like "install Python" and you will be spoilt for choice.

Our first task is to prove that Python and Tkinter are installed and working on our computer. In this book, we use Python version 2.6. Python 3.0 which came out in 2010 requires some changes in syntax that we won't be using in this book.

Let's look at some simple tests to check if Python is installed. If we download and install Python on Windows, it automatically includes Tkinter as one of the essential modules so we do not need to acquire and install it separately.

主站蜘蛛池模板: 长沙市| 绥芬河市| 大城县| 呼和浩特市| 新绛县| 谷城县| 博客| 黎城县| 瑞昌市| 通州区| 乌兰浩特市| 五大连池市| 百色市| 江口县| 新邵县| 虞城县| 台东市| 宣威市| 固镇县| 灵石县| 涪陵区| 永济市| 长丰县| 东乌| 禹城市| 垫江县| 江山市| 明星| 滁州市| 香河县| 垦利县| 高安市| 奎屯市| 冷水江市| 三门县| 冷水江市| 乳源| 民权县| 房产| 图们市| 阿克陶县|