wxPython In Action

Noel Rappin, Robin Dunn

Publisher: Manning, 2006, 552 pages

ISBN: 1-932394-62-1

Keywords: Python, Graphics

Last modified: Nov. 9, 2008, 11:41 a.m.

wxPython is an open source GUI toolkit for the Python programming language. It offers productivity gains and useful features for any programmer, and is quickly gaining in popularity as a result. The only published source for the wxPython toolkit, co-authored by the toolkit's developer Robin Dunn, wxPython in Action shows readers why wxPython is a better interface tool than Tkinter, the tool that is distributed with Python.

Because they are often large and complex, GUI programming toolkits can be hard to use. wxPython is a combination of the Python programming language and the wxWidgets toolkit, which allows programmers to create programs with a robust, highly functional graphical user interface, simply and easily. wxPython combines the power of an exceptionally complete user interface toolkit with an exceptionally flexible programming language. The result is a toolkit that is unique in the ease with which complex applications can be built and maintained.

wxPython in Action is a complete guide to the wxPython toolkit, containing a tutorial for getting started, a guide to best practices, and a reference to wxPython's extensive widget set. After an easy introduction to wxPython concepts and programming practices, the book takes an in-depth tour of when and how to use the bountiful collection of widgets offered by wxPython. All features are illustrated with useful code examples and reference tables are included for handy lookup of an object's properties, methods, and events. The book enables developers to learn wxPython quickly and remains a valuable resource for future work.

  • Part 1 Introduction to wxPython
    • Chapter 1 Welcome to wxPython
      1. Getting started with wxPython
      2. Creating the bare-minimum wxPython program
      3. Extending the bare-minimum wxPython program
      4. Creating the final hello.py program
      5. What can wxPython do?
      6. Why choose wxPython?
      7. How wxPython works
      8. Summary
    • Chapter 2 Giving your wxPython program a solid foundation
      1. What do I need to know about the required objects?
      2. How do I create and use an application object?
      3. How do I direct output from a wxPython program?
      4. How do I shut down my wxPython application?
      5. How do I create and use the top-level window object?
      6. How do I add objects and subwindows to a frame?
      7. How can I use common dialogs?
      8. What are some common errors with application objects and frames?
      9. Summary
    • Chapter 3 Working in an event-driven environment
      1. What terminology do I need to understand events?
      2. What is event-driven programming?
      3. How do I bind an event to a handler?
      4. How are events processed by wxPython?
      5. What other event properties are contained in the application object?
      6. How can I create my own events?
      7. Summary
    • Chapter 4 Making wxPython easier to handle with PyCrust
      1. How do I interact with a wxPython program?
      2. What are the useful features of PyCrust?
      3. What do the PyCrust notebook tabs do?
      4. How can I wrap PyCrust around my wxPython application?
      5. What else is in the Py package?
      6. How can I use modules from the Py package in my wxPython program?
      7. Summary
    • Chapter 5 Creating your blueprint
      1. How can refactoring help me improve my code?
      2. How do I keep the Model and View separate in my program?
      3. How do I unit-test a GUI-program?
      4. Summary
    • Chapter 6 Working with the basic building blocks
      1. Drawing to the screen
      2. Adding window decorators
      3. Getting standard information
      4. Making the application look nice
      5. Summary
  • Part 2 Essential wxPython
    • Chapter 7 Working with the basic controls
      1. Displaying text
      2. Working with buttons
      3. Entering and displaying numbers
      4. Giving the user choices
      5. Summary
    • Chapter 8 Putting widgets in frames
      1. The life of a frame
      2. Using frames
      3. Alternative frame types
      4. Using splitter windows
      5. Summary
    • Chapter 9 Giving users choices with dialogs
      1. Working with modal dialogs
      2. Using standard dialogs
      3. Creating a wizard
      4. Showing startup tips
      5. Using validators to manage data in a dialog
      6. Summary
    • Chapter 10 Creating and using wxPython menus
      1. Creating Menus
      2. Working with menu items
      3. Sprucing up your menus
      4. Usability guidelines for menus
      5. Summary
    • Chapter 11 Placing widgets with sizers
      1. What's a sizer?
      2. Basic sizers with the grid sizer
      3. Using the other sizer types
      4. Can I see a real-world example of sizers in action?
      5. Summary
    • Chapter 12 Manipulating basic graphical images
      1. Working with images
      2. Dealing with device contexts
      3. Graphics manipulation
      4. Summary
  • Part 3 Advanced wxPython
    • Chapter 13 Building list controls and managing items
      1. Building a list control
      2. Managing items in a list
      3. Responding to users
      4. Editing and sorting list controls
      5. Creating a virtual list control
      6. Summary
    • Chapter 14 Coordinating the grid control
      1. Creating your grid
      2. Working with your grid
      3. Custom renderers and editors
      4. Capturing user events
      5. Summary
    • Chapter 15 Climbing the tree control
      1. Creating tre controls and adding items
      2. What styles control the display of the tree control?
      3. Sorting elements of a tree control
      4. Controlling the image for each item
      5. Navigating the tree programmatically
      6. Managing the tree selection
      7. Controlling which items are visible
      8. Making a tree control user editable
      9. Responding to other user events from a tree control
      10. Using a tree list control
      11. Summary
    • Chapter 16 Incorporating HTML into your application
      1. Displaying HTML
      2. Manipulating the HTML window
      3. Extending the HTML window
      4. Summary
    • Chapter 17 The wxPython printing framework
      1. How do I print in wxPython?
      2. How do I display the print dialog?
      3. How do I display the page setup dialog?
      4. How do I print something?
      5. How can I perform a print review?
      6. Summary
    • Chapter 18 Using other wxPython functionality
      1. Putting objects on the clipboard
      2. Being the source o a drag and drop
      3. Being the target of a drag and drop
      4. Transferring custom objects
      5. Setting timed events using wx.Timer
      6. Creating a multithreaded wxPython application
      7. Summary

Reviews

wxPython In Action

Reviewed by Roland Buresund

Good ******* (7 out of 10)

Last modified: June 7, 2008, 9:42 p.m.

If you're into wxPython, this is a must have

Unfortunately, this is the only game in town, so the mistakes, omissions (like MultiMedia), etc., have to be accepted.

That said, it is a good introduction to the subject, even though you need to understand GUI-programming, OO, Python and a bit of wxWidgets beforehand. But at least it is a lot easier to read than many Java books :-), but it is not a reference book, more of a quick overview.

Comments

There are currently no comments

New Comment

required

required (not published)

optional

required

captcha

required