Possibility and Probability

Coding Python and making businesses…

21 September 2006


by Nick

…Or, I love it when a plan comes together. :) A while ago I wrote a small GUI app in python using Tk (Tkinter to be specific). It worked pretty good on Windows machines, which is where I was running it at the time. About a year later I tried to run it on a Mac, and the results were a little surprising. It did not look good. It seems that there are some differences between the Tk stuff on different platforms. Every since then I’ve been wondering if there was a more platform independent way of making Python GUI apps. I’d heard a lot about wxPython, so I decided to give it a shot. The documentation is pretty good and the demos that come with it helped me get up to speed pretty quickly. (Plus the API reminded me of some work I did in the Win32 world a few years ago, and surprisingly, that helped me get things “working” faster than I think I would have otherwise.) Anyways, I built a little app to visualize an idea I’ve been having for a few weeks ago. Again, on Windows machines it looks great. Today I remembered that I hadn’t run it on a Mac yet. With a little bit of trepidation, I grabbed the code and hit run. Lo-and-behold it runs great on the Mac. A little bit slow on the re-draw, which probably has more to do with how I wrote the event handlers, but it ran and looked just like it does on the Windows machines. Thus I have concluded: wxPython rocks.