Speak and Shout

Monday, March 27, 2006

Why not wxPython

Hoang has some insight into why it's probably a good idea that wxPython isn't the standard GUI for Python. As I've worked with Tkinter more, it's certainly limiting in some respects, but being connected with Tcl/Tk, it's very stable. I'd hate to try keeping up with API changes every time a new version of Python was released.

3 Comments:

  • As having authored several wxPython small programs, I can tell you my general method for handling this: 1 - since Windows is my main target OS most of the time, I compile to .exe with py2exe and that freezes thing for that release, 2 - stay up with current naming paradigm. Hoang most likely ran into trouble because 3 years ago wxPython was still using the old naming scheme of wxWindow and wxButton etc... instead of the wx.Window and wx.Button style of naming and access. There was a hack to try to support the old naming scheme but eventual you have to switch. Since migrating to the newer naming scheme, I haven't had any problems with any of my apps (since they are small)... getting them to work correctly with wxPython.

    As a whole, Tkinter seems too limiting and too strange. Plus, I've found wxPython apps actually transport (py2exe) way easier than Tkinter apps. I had nothing but trouble trying to get a Tkinter app to run on a machine without Python on it. Total disaster. But with wxPython... 1 .dll and .pyd and it's good to go.

    By Anonymous ScW, At 11:46 PM  

  • But wait ...
    - Windows is your target OS.
    - Eventually you should have to switch since wxWindows changed its API.

    These seem to be at odds with
    - A Python GUI needs to be cross-platform.
    - APIs should be stable between versions. I don't think anyone has had to change their Python code around since the major 1.5.2 to 2.0 move (if I'm not mistaken).

    Packaging Tkinter for another machine is tricky though, I agree.

    By Blogger Brandon Corfman, At 8:16 AM  

  • I've just ordered wxPython in Action from Barnes and Noble, so I'll see if this changes my mind.

    By Blogger Brandon Corfman, At 11:45 AM  

Post a Comment



<$I18N$LinksToThisPost>:

Create a Link

<< Home