Python GUI

Phil Hunt philh at vision25.demon.co.uk
Sun Aug 8 15:11:14 CEST 1999


In article <37aacdf9.324492916 at news.oh.verio.com>
           ap096 at po.cwru.edu "Kevin Dahlhausen" writes:
> Under linux, there is a wrapper for fltk that translates the data files from the> FLTK gui builder to Python.  This one is very much a work in progress though.
> It should also work under Windows, but that is still theory at this point.
> http://fltk.netpedia.net

How does fltk compare with other GUI libraries such as Tk, GTK, KDE/Qt,
etc? Is there room for yet another user interface library?
 
> Randall Hopper <aa8vb at yahoo.com> wrote:
> > |Is there a Python GUI builder out there anywhere?

I'm currently writing a generic GUI builder.

It doesn't (and won't) have a graphical user interface, the user
will write a user interface definition file, which will then be
compiled by my tool into the programming language and GUI toolkit of
your choice. A definition file might look like this:


table align=right {
   tr {
      td { label "Name:" }
      td { textField @Name cols=10 }
   }
   tr {
      td { label "Type:" }
      td { radioButton @Int "int" 
           radioButton @String "string" 
           radioButton @Float "floating point"
      }
   }
   tr {
      td { label "Description:" }
      td { textField @Desc cols=20 }
   }
}


Which might produce a form like this:

+-----------------------------------------------------------+
|  Name:         [..........]                               |
|                                                           |
|  Type:         (*) int  ( ) string  ( ) floating point    |
|                                                           |
|  Description:  [....................]                     |
+-----------------------------------------------------------+


The program is written in Python.
At the moment, I'm working on producing Python/Tkinter and HTML
back ends. I'm trying to make the back ends modular from the
main program and easy to code.

The idea is that it will, in principle, be able to generate code for 
any back end. (Once someone has written that back end, of course).
The advantage of this is that the UI definition language only needs 
to be learned once, and can be used for lots of languages and GUI
toolkits (of which there are a lot around).


-- 
Phil Hunt....philh at vision25.demon.co.uk





More information about the Python-list mailing list