The wxPython Google Group was discussing different methods of catching exceptions in wxPython the other day. If you use wxPython a lot, you will soon realize that some exceptions are difficult to catch. The wxPython Wiki explains why. Anyway, the fellows on the list were recommending the use of sys.excepthook. So I took one of […]
The other day someone was asking a lot of questions on StackOverflow about how to work with wizards in wxPython. You can read the two original questions here and here. The code we'll be looking at in this example is what I used to answer the questions on Stack. The primary question was how to […]
One of my friends on the wxPython Google Group asked how to catch any exception that happens in wxPython. The problem is complicated somewhat because wxPython is a wrapper on top of a C++ library (wxWidgets). You can read about the issue on the wxPython wiki. Several wxPython users mentioned using Python's sys.excepthook to catch […]
I've been thinking about creating a simple downloading script with wxPython for quite a while. Then I saw someone on StackOverflow asking about how to do it and I decided it was time to figure it out. Downloading a file with Python is trivial. I wrote about a couple of different ways to do that […]
The wxPython toolkit provides an alternative to using Sizers for layout that is known as "sized_controls". These controls or widgets are basically top-level widgets (like frame, panel, dialog, etc) that have sizing logic built into them. This article will cover all four types of sized_controls. They are as follows: SizedPanel SizedScrolledPanel SizedFrame SizedDialog The SizedScrolledPanel […]
wxPython 2.9 introduced the world to a new type of sizer that can take widgets and automatically make them "wrap" around as you resize the frame. That sizer is known as wx.WrapSizer. For some reason, it is relatively unknown, so we'll spend a few minutes going over how to use it in this article. To […]