Python Workshop: Part 2

Before you design a GUI with Python, you need to understand a few basics about object-oriented programming. That's because object-oriented programming is what you'll need to create a graphical user.

Shirts Are Simply Objects

Because everything is an object in Python, you often need to design your own objects before you can use them in your program. Admittedly, this is a somewhat abstract concept. I'll use an example from daily life to make it easier to understand. A shirt is an object. Object-oriented code can represent this shirt as an abstract concept as shown in Listing 1. As always, you can find the source code for the examples on the Ubuntu User website [1].

Right on the first line, you specify the file encoding with # - * - coding: utf-8 - * - , which allows you to use characters from all languages in your (unicode) strings and comments. Of course, you need to save this file in the indicated encoding or the program will fail to start. How you go about this depends on the editor you use. With Gedit, you can use the menu item File | Save as and choose the encoding.

[...]

Use Express-Checkout link below to read the full article (PDF).