Robin Dunn is the creator of wxPython and the author of “wxPython in Action”. wxPython is an Open Source, cross-platform GUI toolkit for the Python programming language. Robin has been working in the IT industry for almost 2 decades. In this interview he talks about wxPython as well as his other Python projects. He also tells us about his role at the Open Source Applications Foundation (OSAF) and shares his views on Zope, Python and other open source languages like Ruby.
PythonThreads >> Hello Robin. We are glad to have you on PythonThreads. Could you introduce yourself?
Robin Dunn >> Hello. My name is Robin Dunn and I live in Vancouver, Washington,USA. I’ve been programming computers ever since I taught myself BASIC on a TRS-80 back in the dawn of time. In High School I was the one that the CompSci teacher asked for help when he couldn’t figure something out. Over the years since then I’ve worked for a large multi-national company, some medium sized companies and small startups, on a wide variety of applications, and have been using Python since the mid 90’s. For much of the time since about 2001 I’ve been working full-time either on wxPython, or with wxPython, or on something related to wxPython.
PythonThreads >> Could you tell our readers more about wxPython, PyBSDDB and your other Python projects?
Robin Dunn >> Most people know that I am the man behind wxPython, but not many know about the other Open Source projects that I have worked on over the years. I’ve always enjoyed getting into code and learning to make sense of it, and usually making some adjustments along the way. Some of those have been contributed back to the projects, including Apache and Zope, but usually it was just done for fun. I don’t have time for that anymore as wxPython is taking up all my time, but along the way I had a few other projects that I put a large chunk of work into.
One of those was PyBSDDB, a Python wrapping of the Sleepycat Berkeley DB library. This was the first project that I used SWIG on and that helped to pave the way for my work on wxPython. Later I worked on PyBSDDB again and converted it to a SWIG-less version and got it into good enough shape that others were able to take it the rest of the way into the Python core distribution. I’ve also worked on a FastCGI module for Python, and an extension to the Xitami webserver that allowed it to communicate with and serve pages from out of process web applications.
“I’ve always enjoyed getting into code and learning to make sense of it…”
PythonThreads >> What inspired you to write wxPython?
Robin Dunn >> One of Python’s motto’s is that “Python fits your brain” and for me it certainly did. So much so in fact that I became one of the “converted” within just a few hours. Unfortunately (or fortunately depending on your perspective) Tkinter just wouldn’t fit my brain. No matter how hard I tried I just couldn’t wrap my head around it and still feel uncomfortable with it. Since my introduction to Python had been via the wxWigets C++ library (see http://wiki.wxpython.org/index.cgi/WxPythonHistory) I decided to go back and resurrect the Python bindings project. That was about eight or nine years ago. The rest is, as they say, history.
“Tkinter just wouldn’t fit my brain…”
PythonThreads >> How widely is wxPython used? Are there particular segments that are a good match for wxPython?
Robin Dunn >> I don’t have a real good handle on how many actual programmers are using wxPython, but I can give some anecdotal evidence and let you draw your own conclusions. Downloads for the past 12 months have ranged between thirty and fifty thousand per month, (although that probably equates to about 10 to 20 thousand actual people doing the downloads as most will download more than one file.) Over the past few years I’ve received emails from wxPython users from every continent (except for Antarctica, if there are any penguins using wxPython please send me an email!) and from every major and many not so major countries.
The user community is fairly active on the wxPython-users mail list, and I’ve been greatly helped out by several users taking on the responsibility of helping newbies and others with questions. I also get the feeling that there are a large number of active wxPython users that are not showing up on the radar, except perhaps when they need to get some help from the mail list or elsewhere.
“There are a large number of active wxPython users that are not showing up on the radar…”
I feel that wxPython is a good answer for almost any kind of desktop application, especially if native look and feel using native widgets is important. I’ve seen or had reports of wxPython being used for many kinds of applications, some that I wouldn’t have ever expected.
There have been things like database front-ends and database design tools, POS retail applications, computer based training and other education oriented systems, games, game configuration editors, programmer editors, IDEs and debuggers, a beer recipe designer, RSS aggregators and readers, a pharmaceutical molecule designer, large scale scientific analysis tools, a front-end for a large scale parallel processing simulation application, geophysical research applications, media players, music editors, blog editors, PIMs and similar tools like Chandler, and the list goes on an on.
“wxPython is a good answer for almost any kind of desktop application…”
PythonThreads >> How would you compare the GUI options in the Python world with those from the Java and Microsoft world?
Robin Dunn >> I’ve been fully immersed in the wxWidgets world for so long that I really haven’t kept up on the other options for a while. However I think that for me it comes down to a few simple factors. First, the ease of use for the programmer. Second, true native look and feel, which usually equates to ease of use for the end-user if the programmer does his job right. Third, the depth and breadth of what the toolkit offers the programmer and enables them to accomplish. Fourth, the freedom to use the toolkit for applications that are deployed in whatever way you need to deploy them, open, closed, or whatever.
“I’ve been fully immersed in the wxWidgets world, I really haven’t kept up on the other options for a while….”
PythonThreads >> What strengths or advantages does wxPython have over Tkinter ?
Robin Dunn >> The things that people mention the most are the completely native look and feel that wxPython has that Tkinter doesn’t, and also the larger number of widgets that wxPython provides. That doesn’t mean that wxPython is all roses, it does have its issues. One of them is that it is a large toolkit and can be more difficult to learn than Tkinter (at least for people for whom Tkinter fits their brain) but there are remedies for that, the wxPython in Action book is one of them.
Many folks feel that the complexity cost is worth it in the long run because you don’t run into the walls imposed by a less capable toolkit. One user put it like this, “Yes, with wxPython you pay the price up front, in the learning curve. With Tk you pay it later, when you’re developing applications with real interface requirements.”
“With wxPython you pay the price up front, in the learning curve. With Tk you pay it later….”
PythonThreads >> You have been working in the IT industry for almost 2 decades, and have worked with many programming languages. What are the key points that you noticed in the changing languages and software techniques over the years?
Robin Dunn >> Wow. Two decades. Now I really feel old. I’ve spent some time lately thinking about how things have changed in our recent history, and how seemingly little advances in technology have had profound affects on our modern society and culture. For example, my parents can remember when their families got their very first television set and what a novelty it was.
I can never remember a time when the family didn’t have a television, but I do remember how exciting it was when our local cable company started providing a feed on all 12 channels that our TV was able to receive. (Yes kids, TV’s used to be able to only tune in 12 channels, and that was expected to be more than anybody would ever need.) Today people would feel cheated if they aren’t able to get a hundred or two channels, plus pay-per-view and on-demand movies and so on.
Going back just one generation further, my grandparents tell stories about when they were kids and automobiles were very rare and were something that only the rich folks had. Where would we be today, and what would our society be like without the car, without semi’s making deliveries from one side of the country to the other, without FedEx? Even in my own lifetime I have seen tremendous changes in society and culture due to many relatively small advances in technology. The personal computer, the spreadsheet, the word processor, email, the world-wide-web, instant messenger, cell phones, iPods, video games, and so on. And it will continue to go on from here.
My kids won’t remember a time before the personal computers, the world-wide-web and instant messenger, (in fact some of my kids had mastered a mouse and icon manipulation before they could handle a spoon on their own) but they will see many new and interesting things. It makes me wonder what kinds of innovations they will find common place in ten or twenty years that will make them wonder what their world would be like if those minor advances in technology along the way hadn’t been developed.
“I have seen tremendous changes in society and culture due to many relatively small advances in technology…..”
To get back to your question, I feel that programming languages and the art of software design have followed the same kinds of patterns. There have been many little advances in the past that have had great influences over what we have available to us today and the way in which we work. We’ve gone from assembly language to compiled languages, 4GL’s, interpreted, byte-compiled, and etc.
There have been languages created for a very focused and specific task, such as database manipulation or for vector graphics animation, and also very general purpose languages. We’ve seen languages that foster specific programming techniques like procedural, functional, object-oriented, and so on. And we’ve seen languages that are highly structured and languages that are very free form and can really fit your brain.
I think that Python’s success is in part because of its ability to fit in many of the language categories and design techniques in some way or another. What will the future bring? I have no idea but two things are certain: first, some little thing that somebody somewhere is working on right now can have a tremendous impact on how and why programs are written in the future, and second, there will be almost as many opinions about it as there are programmers in the world.
“Python’s success is in part because of its ability to fit in many languages and design technique…”
PythonThreads >> What factors do you think contribute to the success of Open Source & Open Source Languages like Python?
Robin Dunn >> The way I see it there are two main factors for the success of Open Source. First, Open Source allows the little guy or gal to feel like they are contributing something of value, that they are making a difference for the good of the world. It goes way beyond the scratch-your-own-itch theory, although a person’s involvement with Open Source may often start out that way. I think that it is a basic human need to feel like you’ve done something good that benefits others.
Open Source is one avenue that somebody with the desire and the ability can fulfill that need. The second factor is related to the first, as it also has to do with the motivation of the programmer in fulfilling another basic human need, the need to feel appreciated. In a corporate environment the management expresses their appreciation with things like raises, promotions, stock options, nice offices, dumb awards, trade show trips, big benefits, etc. Unfortunately, very often these things are doled out less because of the person’s skills and abilities, and more because of things like personality, good looks, interpersonal relationships, kickbacks, various political reasons, or butt-kissing.
In the Open Source world it is a completely different system. Praise and appreciation is almost never expressed in monetary or other physical quantities, and the reasons for the appreciation are almost always based solely on the skills and the abilities of the programmer, making it something that he or she can be proud of, and that righteous pride engenders a desire to get more of it. To sum up, it could be said that some form of greed is what drives almost all innovation and progression and work done in the corporate world. In the Open Source world it is predominantly the opposite situation, the driving factors are the desire to do Good and the desire to receive praise for doing Good.
If the programmer is also able to pay the rent and put food on the table by working on Open Source then that is obviously a much better situation, but it should not ever be the driving factor.
“Open Source is one avenue that somebody with the desire and the ability can fulfill that need…“
I think the same model of Open Source programmers can also be extrapolated to apply to programming languages. The more freedom and ability that a language gives a programmer, the more it fits his or her way of working, the more it enables him or her to do, then the more he will praise the language, and the more she will use it to do good things.
The more praise about the language and the more good things done with the language then the more other programmers hear about it and give it a try. Eventually the praise and goodness affects the language itself (via the programmers working on it) and it has the potential to become even better and even more widely used.
“The more freedom and ability that a language gives a programmer, the more it fits…”
PythonThreads >> Ruby language has been around for a long time, but it did not have much of an impact until the arrival of “Ruby On Rails”. So a killer application is required for a language to become really popular. Do you see such a Python based killer application in the present or near future?
Robin Dunn >> I think Python has already had at least one killer app, Zope. I think Zope did more directly or indirectly for the growth of Python than anything else in recent memory. It got people using Python and programming in Python that probably never would have given the language a second look otherwise. And the beautiful thing is a lot of those people would not have considered themselves programmers before. I expect that we’ll probably see several more killer apps that benefit Python in one way or another. The key is that that whatever it is, if it allows people to do something that they couldn’t do or was difficult before, and in the process of doing it this new way they are exposed to the Python language, then BANG! we’ve got a new user and Python lover.
“Zope did more directly or indirectly for the growth of Python than anything else…”
PythonThreads >> Could you tell us about your work with the Open Source Applications Foundation (OSAF)?
Robin Dunn >> Sure. I’ve been working for OSAF since about December 2002. I’ve been their first line of support for all wxPython or wxWidgets issues, and also have helped them out with SWIG and various other things. I assist the OSAF developers with wx related features and bugs, and also to a certain extent have acted as liaison with the core wxWidgets developers. OSAF allows me to spend the rest of my time working on wxWidgets and wxPython in whatever ways I see fit. This has been a very great opportunity for me, for wxPython and also for OSAF, and I’m very thankful that this opportunity has been available for me and for OSAF’s generosity.
PythonThreads >> Which ongoing wxPython and Python related developments do you find most exciting?
Robin Dunn >> Um, is “all of them” an acceptable answer? <wink>
I always enjoy learning about new features in Python, or about new tools or applications that use Python. And like most people I think that it’s fun to speculate about what Python 3000 might look like. The wxWidgets team has also started discussing a new major version of wxWidgets that, like Python 3000, is being looked as as an opportunity to cut loose some of the old baggage, make some structural changes to the framework, and to redesign the API. The exciting part for me is that I’ll be involved from the beginning and able to influence the design in ways that would be beneficial for wxPython (and probably other language bindings as well.)
“It’s fun to speculate about what Python 3000 might look like….”
PythonThreads >> Your book “wxPython in Action” has just been published. Congrats! What do you think are the highlights of the book?
Robin Dunn >> Thanks. It’s been a very long project, but I think that the effort that everyone has put into it will be worth it. Some of the highlights are a chapter that explains event driven programming and traces the path that an event will take through the system in search of an event handler, a chapter that demystifies the sizer layout mechanism, and a chapter that discusses topics such as refactoring and unit testing in GUI programs, and also using design patterns such as MVC.
We’ve tried to make the book be useful both for newbies and also for those who already have some experience with wxPython, and from some of the early feedback we are receiving I think we have succeeded in that goal. My only regret is that we were not able to put more content into the book than we did.
“The book is useful for both, newbies and experienced wxPython users…”
PythonThreads >> Thanks Robin. It’s been good talking to you. Could you share your blog url or email address with our readers?
Robin Dunn >> I keep telling myself that I should start doing a blog, but so far haven’t taken the plunge. In the meantime I’m available at [robin at alldunn dot com] or on the wxPython-users mail list at [wxPython-users at lists dot wxwidgets dot org].