XML GUI

P

py

Looking for information on creating a GUI using a configuration file
(like an XML file or something). Also, how do you map actions (button
clicks, menu selections, etc) to the XML?

Any other suggestions for building GUI's for Python projects...even
Jython.

Thanks
 
D

dakman

I had to do something like this for a project I was working on a while
ago, it was a program based on alota plugins that would use a config
file that looked sorta like an Xorg configuration, it seemed kinda hard
at the time but it's acctually pretty fun and easy, the hard part is
functionality you wanna make sure that you have everything planed out
before tackling this, as for bindings and whatnot all I did was type
the method I want to call in the config, and then I would use eval() to
call it up, kinda sloppy but it worked fine.
 
P

py

how about wxPython? I am interested in something that will look native
on various operating systems (win, mac, *nix).

any good tutorial on using wxPython with XML?
 
D

dcrespo

www.wxpython.org

Look for the Docs and examples file. It has a full list of interesting
examples, including the way for loading GUIs from xrc files. The xrc
files can be generated from DialogBlocks, XRCEditor, wxDesigner.

Daniel
 
B

Brendan

py said:
how about wxPython? I am interested in something that will look native
on various operating systems (win, mac, *nix).

any good tutorial on using wxPython with XML?

The wxPython distribution comes with XRCed, which is a graphical
gui-builder that serializes to XRC (wxWidgets XML syntax).

(I'm assuming you just want to use XML to describe the gui. If you
want to define your own xml syntax, then you'll have to wait for
someone more experienced than me for help. There are several packages
for using cusom XML. You can start here:
http://effbot.org/zone/element-index.htm)

Brendan
 
P

py

wxPython sounds like it might be the ticket...especially with the XRC
files.

I plan on defining the GUI via XML, and actions in my python app.

Thanks
 
J

jmdeschamps

Brendan said:
The wxPython distribution comes with XRCed, which is a graphical
gui-builder that serializes to XRC (wxWidgets XML syntax).

(I'm assuming you just want to use XML to describe the gui. If you
want to define your own xml syntax, then you'll have to wait for
someone more experienced than me for help. There are several packages
for using cusom XML. You can start here:
http://effbot.org/zone/element-index.htm)

Brendan

And you can check this effbot page, for a XML to GUI example.!
See "more stupid element tricks: generating tkinter user interfaces
from xml, part 1 " at
http://online.effbot.org/2003_08_01_archive.htm

Good luck!
 
W

William Park

py said:
Looking for information on creating a GUI using a configuration file
(like an XML file or something). Also, how do you map actions (button
clicks, menu selections, etc) to the XML?

Any other suggestions for building GUI's for Python projects...even
Jython.

If you're talking about simple "dialog" thing, where you ask question
and users respond, then take a look at
http://home.eol.ca/~parkw/index.html#gtk

Also, you may want to look at Glade which spits out the layout in XML.

But, for more intricate to-and-fro, use C and GTK+2. :)

--
William Park <[email protected]>, Toronto, Canada
ThinFlash: Linux thin-client on USB key (flash) drive
http://home.eol.ca/~parkw/thinflash.html
BashDiff: Super Bash shell
http://freshmeat.net/projects/bashdiff/
 
J

Jarek Zgoda

py napisa³(a):
Looking for information on creating a GUI using a configuration file
(like an XML file or something). Also, how do you map actions (button
clicks, menu selections, etc) to the XML?

Depending on GUI toolkit, you will have a range of choices: Glade for
GTK, XRC for wxPython, Qt dialog editor also produces XML files with UI
description. Each of these toolkits has its own way to process GUI events.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,143
Latest member
SterlingLa
Top