Missed the Campaign but still want the book?
You can get it on Gumroad or Leanpub!
Several years ago, the readers of my popular Python blog asked me to take some of my articles and turn them into a cookbook on wxPython. I have finally decided to do just that. I am including over 50 recipes that I am currently editing to make them more consistent and updating them to be compatible with the latest versions of wxPython. I currently have nearly 300 pages of content!
In case you don't know what wxPython is, the wxPython package is a popular toolkit for creating cross platform desktop user interfaces. It works on Windows, Mac and Linux with little to no modification of your code base.
The examples in my book will work with both wxPython 3.0.2 Classic as well as wxPython Phoenix, which is the bleeding edge of wxPython that supports Python 3. If I discover any recipes that do not work with Phoenix, they will be clearly marked or there will be an alternative example given that does work.
Here is a listing of the current set of recipes in no particular order:
- Adding / Removing Widgets Dynamically
- How to put a background image on a panel
- Binding Multiple Widgets to the Same Handler
- Catching Exceptions from Anywhere
- wxPython's Context Managers
- Converting wx.DateTime to Python datetime
- Creating an About Box
- How to Create a Login Dialog
- How to Create a "Dark Mode"
- Generating a Dialog from a Config File
- How to Disable a Wizard's Next Button
- How to Use Drag and Drop
- How to Drag and Drop a File From Your App to the OS
- How to Edit Your GUI Interactively Using reload()
- How to Embed an Image in the Title Bar
- Extracting XML from the RichTextCtrl
- How to Fade-in a Frame / Dialog
- How to Fire Multiple Event Handlers
- Making your Frame Maximize or Full Screen
- Using wx.Frame Styles
- Get the Event Name Instead of an Integer
- How to Get Children Widgets from a Sizer
- How to Use the Clipboard
- Catching Key and Char Events
- Learning How Focus Works in wxPython
- Making Your Text Flash
- Minimizing to System Tray
- Using ObjectListView instead of ListCtrl
- Making a Panel Self-Destruct
- How to Switch Between Panels
- wxPython: Using PyDispatcher instead of Pubsub
- Creating Graphs with PyPlot
- Redirect Python's Logging Module to a TextCtrl
- Redirecting stdout / stderr
- Resetting the Background Color
- Saving Data to a Config File
- How to Take a Screenshot of Your wxPython App and Print it
- Creating a Simple Notebook
- Ensuring Only One Instance Per Frame
- Storing Objects in ComboBox or ListBox Widgets
- Syncing Scrolling Between Two Grids
- Creating Taskbar Icons
- A wx.Timer Tutorial
- How to Update a Progress Bar from a Thread
- Updating Your Application with Esky
- Creating a URL Shortener
- Using Threads in wxPython
- How to Create a Grid in XRC
- An Introduction to XRC
Note: Recipe names and order are subject to change
Here are some example screenshots that were made with the code in the book:
This book will be written using my original blogging style. What this means is that the chapters will probably be shorter than most programming books (i.e. less than 20 in most cases). However the code examples in some cases may end up being longer in general so the chapter page count could be more than Python 101.
I still follow the rule of giving simple examples paired with simple explanations instead of spending an inordinate amount of time re-explaining the same subject over and over.
Who should read this book?
This book is targeted for people who have Python in the past and would like to learn about wxPython. It is not meant to be an introduction to wxPython though, so it would help if you already know a little about wxPython itself as well.
What's the money for?
ISBNs cost money, especially if you have multiple formats of the book (paperback, PDF, mobi, etc). The money will also cover the initial print run of the book for the backers. It would b great if I could do some web advertising as well. I'm looking forward to working with my backers to make the best Python book possible!
About the Author
I'm a professional full time Python programmer by day and Python blogger by night. I've been programming almost exclusively in Python for almost 10 years. I co-authored Core Python for DZone. I also ran a successful campaign for my first book, Python 101, which you can read more about here
The finished book will be made available in the following formats:
- paperback (at the appropriate perk level)
Risks and challenges
Frankly I don't see much of a risk. The book is already in the editing phase and I expect to be done with that in 6-8 weeks barring any major delays. I actually hope to deliver the book early.
However the unexpected does happen which is why I have given myself a buffer until January to finish the book. I am confident that I can meet that goal or exceed it.Learn about accountability on Kickstarter
- (30 days)