Slashdot Mirror


Generic GUI Wrapper For Python

An Anonymous Coward writes "IBM is working on a generic GUI wrapper to allow Python developers to write cross-platform GUIs. The anygui project will expose a common set of functions to the programmer and choose which backend gui toolkit to use for the given platform: TK, WIN32, GTK, Bethon, etc. Currently the software is in an alpha stage. The article also has some example code." Update: 10/27 23:53 GMT by T : Magnus Lie Hetland wrote to point out that though this article is hosted at IBM, "Anygui has nothing to do with IBM. It is, in fact, an independent Open Source project currently hosted at SourceForge."

4 of 114 comments (clear)

  1. random Java flaming again by mj6798 · · Score: 4, Insightful
    Mertz writes: A popular joke about Java is that it is "write once, debug everywhere."

    Pretty much all the portability problems with AWT came from the use of native widgets. So, why is Mertz going to repeat the same mistake in his implementation? In fact, it looks like he is going to work hard to make things worse by exposing different APIs on different platforms.

    There are a couple of good cross-platform GUIs for Python: FLTK with Python bindings, Fox with Python bindings, and wxWindows (universal or native) with Python bindings. Mertz's project seems like it recreates something whose functionality already exists--a typical case of N.I.H.

  2. Not IBM... by kraftknoedel · · Score: 5, Informative

    You might be interested to know that this project has nothing to do with IBM. There is an article about it on IBM developerWorks, but that's it.

    Also, it's not David Mertz's project, the project leader is Magnus Lie Hetland.

    More info: http://anygui.sf.net/

    Regards,
    Kalle Svensson, PyGTK backend developer.

  3. seems very naive by jilles · · Score: 3

    SUN has been working for years to create a cross platform application framework. It is called swing. Swing is very complex and heavy on resources but it does the job. It supports printing, drag & drop, integration with the native clipboard, key bindings, skinning, all sorts of graphical stuff and lots of other stuff.

    While you might disagree that Swing is a good solution, the fact remains that Sun realized that all of the above is needed if you want to create competitive GUI apps.

    The solution suggested for python seems to make the same design mistakes sun made early on (AWT) and seems to be based on the same naive view on what comprises a good GUI. In addition it seems to ignore a whole lot of other perfectly good solutions (qt, gtk, XUL, Kylix, Swing, ...). Swing integration is easy if you use jython. I think there are also python bindings for Mozilla so you should be able to create XUL applications in python. Presumably integration with GTK or QT is also easy.

    Wrapping is no good solution for anything but the most trivial applications. As soon as you make things more complex, you will have more and more trouble keeping things crossplatform since each platform works slightly different, has its own bugs to work around and may or may not support what you need.

    --

    Jilles
  4. This is not a new GUI toolkit by richw · · Score: 4, Informative

    Most of the posts so far seem to have missed the point.

    This is not a new GUI toolkit. It is a wrapper API for a large number of underlying graphic toolkits. You write code for AnyGUI and don't have to worry what GUI toolkit is used. "On Windows, the Win32 API might be used (or wxWindows); on MacOS, native calls; on BeOS, Bethon; on Linux, TKinter or GTK"

    Also, as far as I know this is not an IBM project. The article is just published on an IBM site.

    If this works as well as the AnyDBM module which allows basic database access from Python without having to worry about what actual database you are using it will be great.

    Check out http://anygui.sourceforge.net/