Chapter 19. GUI Programming


Chapter Topics

  • Introduction

  • Tkinter and Python Programming

    • Tkinter Module

    • Tk Widgets

  • Tkinter Examples

    • Label, Button and Scale Widgets

    • An Intermediate Tk Example

  • Brief Tour of Other GUIs (Tix, Pmw, wxPython, PyGTK)

  • Related Modules and Other GUIs

In this chapter, we will give you a brief introduction to the subject of graphical user interface (GUI) programming. If you are somewhat new to this area or want to learn more about it, or if you want to see how it is done in Python, then this chapter is for you. We cannot show you everything about GUI application development here in this one chapter, but we will give you a very solid introduction to it. The primary GUI toolkit we will be using is Tk, Python's default GUI, and we will access Tk from its Python interface called Tkinter (short for "Tk interface").

Tk is not the "latest and greatest" nor does it have the most robust set of GUI building blocks, but it is fairly simple to use and will allow you to build GUIs that run on most platforms. We will present several simple and intermediate examples using Tkinter, followed by a few examples using other toolkits. Once you have completed this chapter, you will have the skills to build more complex applications and/or move to a more modern graphical toolkit. Python has bindings or adapters to most of the major toolkits out there, including commercial systems.



Core Python Programming
Core Python Programming (2nd Edition)
ISBN: 0132269937
EAN: 2147483647
Year: 2004
Pages: 334
Authors: Wesley J Chun

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net