WxPython Application Development Cookbook by Cody Precord

By Cody Precord

Key Features

This e-book empowers you to create wealthy cross-platform graphical consumer interfaces utilizing Python
It is helping you increase purposes that may be deployed on home windows, OSX, and Linux
The recipes within the publication contain real-world purposes, supplying you with a first-hand event of the sensible scenarios

Book Description

wxPython is a GUI toolkit for the Python programming language outfitted on most sensible of the cross-platform wxWidgets GUI libraries. wxPython offers a strong set of instruments that let you speedy and successfully construction purposes which may run on quite a few diverse systems. for the reason that wxWidgets presents a wrapper round every one platform's local GUI toolkit, the purposes equipped with wxPython could have a local feel and appear anyplace they're deployed.

This publication provides you with the abilities to construct hugely sensible and local having a look consumer interfaces for Python purposes on a number of working method environments. by way of operating during the recipes, you are going to achieve insights into and publicity to making functions utilizing wxPython. With a variety of issues coated within the e-book, there are recipes to get the main simple of rookies begun in GUI programming in addition to how to aid skilled clients get extra out in their purposes. The recipes will take you from the main simple program constructs throughout to the deployment of entire applications.
What you'll learn

Create complete featured consumer interfaces
layout and increase customized controls
installation and distribute wxPython functions to home windows, Macintosh OS X, Linux, and different UNIX-like environments
deal with and reply to program events
deal with and demonstrate info utilizing grids
have interaction with net prone out of your GUI
Use Paint occasions to attract customized displays
help the reveal of person interfaces in a number of languages

About the Author

Cody Precord is a software program engineer established in Minneapolis, MN, united states. He designs and writes structures and alertness software program for home windows, AIX, Linux, and Macintosh OS X utilizing essentially C++, C#, C, Perl, Bash, and Python. The consistent want for engaged on a number of structures certainly led Cody to the wxPython toolkit, which he has used for numerous years. he's the writer of wxPython 2.8 program improvement Cookbook, Packt Publishing and has additionally contributed to the improvement of the wxPython library. Cody is drawn to selling go platform improvement practices and bettering usability in software.
Table of Contents

wxPython beginning Points
universal consumer Controls
UI format and Organization
packing containers and complex Controls
facts monitors and Grids
how you can Notify and Alert
asking for and Retrieving Information
person Interface Primitives
developing and Customizing Components
Getting Your program prepared for Release

Show description

Read or Download WxPython Application Development Cookbook PDF

Best python books

Fundamentals of Python: From First Programs through Data Structures

In basics OF PYTHON: FROM FIRST courses via information constructions, Washington and Lee collage professor Kenneth A. Lambert offers the entire vital issues in CS1 and CS2 in a single quantity. This cost effective layout presents teachers with a constant method of educating introductory programming and information buildings over a typical two-term path series.

Python for Data Analysis: Data Wrangling with Pandas, NumPy, and IPython

Python for info research is worried with the nuts and bolts of manipulating, processing, cleansing, and crunching info in Python. it's also a realistic, smooth advent to medical computing in Python, adapted for data-intensive functions. it is a e-book concerning the elements of the Python language and libraries you'll have to successfully clear up a huge set of knowledge research difficulties.

Python and AWS

Should you intend to exploit Amazon net prone (AWS) for distant computing and garage, Python is a perfect programming language for constructing purposes and controlling your cloud-based infrastructure. This cookbook will get you began with greater than dozen recipes for utilizing Python with AWS, according to the author’s boto library.

Artificial Intelligence with Python

Construct real-world man made Intelligence purposes with Python to intelligently have interaction with the realm round you approximately This ebook Step into the fantastic global of clever apps utilizing this entire consultant input the area of synthetic Intelligence, discover it, and create your individual functions paintings via easy but insightful examples that would get you up and operating with man made Intelligence very quickly Who This ebook Is For This booklet is for Python builders who are looking to construct real-world synthetic Intelligence purposes.

Additional info for WxPython Application Development Cookbook

Sample text

A ToolBar object provides a functionality very similar to Menu, but it is most often displayed to the user and predominantly uses icons for identification instead of text. In this recipe, we will look at how to set up a ToolBar object on a Frame object by extending the Editor class from an earlier recipe in this chapter. Getting ready This recipe will use the code from the Exploring menus and shortcuts recipe as a base to build the additional use of a ToolBar upon. How to do it… You need to perform the following steps: 1.

It's important to note that if you want to display Bitmap on MenuItem, Bitmap must be attached to MenuItem before MenuItem is attached to Menu! 36 Chapter 2 Next, in our Editor class, we created a MenuBar object; MenuBar acts as the container for Menu objects and is attached to Frame through the frame's SetMenuBar method. In the DoSetupMenu method, we created all the Menu objects and their items as well as bound the event handlers to the menu events. This is done by first creating a Menu object, and then appending MenuItem objects to it using the AddEasyItem method, which we previously added to the EasyMenu class.

The last point to pay attention to in this recipe is the OnChoice event handler. Here, after assigning a new label to the StaticText control, there is a call to the Layout method. This method tells the window's Sizer to recalculate the layout and update the Sizers. This is necessary here to ensure that the control is properly repositioned by the main sizer after having its size changed by the new text. See also ff Refer to the Understanding the hierarchy of the UI recipe in Chapter 1, wxPython Starting Points, for a review and explanation of the different types of UI components and their place in the hierarchy of the UI.

Download PDF sample

Rated 4.93 of 5 – based on 42 votes