GUI definition for web and desktop

Guilherme Polo ggpolo at gmail.com
Sun Feb 3 06:53:28 EST 2008


2008/2/3, Daniel Fetchinson <fetchinson at googlemail.com>:
> Hi pythoneans,
>
>  I'm looking for a simple text based GUI definition format and
>  associated python modules to work with it that is capable of defining
>  simple GUI's for *both* the web and the desktop. I have an application
>  that is accessible through the web and also through desktop
>  applications and both clients should be presented a simple dialog GUI.
>  This dialog will only include text fields, radio buttons and a file
>  upload field. The exact list of fields might change from time to time
>  which implies that both clients should immediately know about it.
>
>  My idea is that if there was a lightweight GUI

lightweight GUIs are a very different thing. It means it renders the
widgets itself, provides uniform look and feel and should be slower.

>  definition format then
>  I would define the current list of fields and other GUI elements in
>  this format, expose this file on the web, and both the web client and
>  the desktop client

Do you mean a web server and desktop client, right ?

>  would first fetch this file  and generate the
>  appropriate GUI from that dynamically. If the GUI changes I would only
>  need to modify my definition file and both type of clients would
>  immediately know about it since before they do anything else they grab
>  this definition.
>
>  I haven't yet decided on the desktop client GUI library, it depends on
>  which library has such a dynamically generatable interface from a text
>  file. But it should be cross platform between linux and windows.
>

For wxPython there are xrc files, for PyGtk you could use glade or
gtkbuilder file formats mainly, PyQt uses .ui and .rc files. They all
are cross platform.

>  What would be the best way to do this?
>

The components you listed "text fields, radio buttons and a file
upload field" are very simple ones. You could use XUL, but you could
use one of the toolkits I said earlier. What you will need to do for
the web server is parse the generated ui file and generate a html from
it, this won't be hard considering the kind of interface you are
doing.

>  Cheers,
>  Daniel
>
> --
>  http://mail.python.org/mailman/listinfo/python-list
>


-- 
-- Guilherme H. Polo Goncalves



More information about the Python-list mailing list