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
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.