September 4, 2013 by
Mike Every now and then, I see someone wondering how to create a progress bar and update it. So I decided to whip up an example application that updates a progress bar (technically a wx.Gauge widget) from a thread. In this tutorial, we will create a frame with a button. When the button is pushed, it […]
Earlier this year, Packt Publishing asked me to be a technical reviewer of one of their upcoming books, "Building Machine Learning Systems with Python" by Willi Richert and Luis Pedro Coelho. Now the book is available for purchase and they have asked me to write a little about it. I haven't read through the finished […]
Today I was reading the wxPython Google group / mailing list and there was someone asking about how to make Python's logging module write its output to file and to a TextCtrl. It turns out that you need to create a custom logging handler to do it. At first, I tried just using a normal […]
Today, I came across an interesting question on StackOverflow where the author was asking how he could write a wxPython program dynamically. In other words, he wanted to be able to edit the code and basically refresh the application without closing and re-running his code. The simplest way would be to use Python's built-in reload […]
I recently became aware of a Tic-Tac-Toe challenge on github where the programmer is supposed to create a Tic-Tac-Toe game that let's the player win every time. You have to code it in Python, although the people behind this challenge prefer you do it with Django. I don't know Django very well, so I decided […]
I recently tried to help someone (on the wxPython mailing list) figure out how to use a Grid widget (wx.grid.Grid) via XRC. It should be simple, but if you run the code below, you'll discover a weird issue: import wx from wx import xrc ######################################################################## class MyApp(wx.App): def OnInit(self): self.res = xrc.XmlResource("grid.xrc") frame = self.res.LoadFrame(None, […]