XML GUI

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • py

    #1

    XML GUI

    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

  • dakman@gmail.com

    #2
    Re: XML GUI

    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.

    Comment

    • kyriakos

      #3
      Re: XML GUI

      if gtk is your toolkit of choice (using pygtk) you can design your user
      interface in glade (which saves it as an xml file) and then load it
      during runtime using libglade

      for more information check pygtk.org
      iand the faq http://www.async.com.br/faq/pygtk/index.py?req=all (-->
      especially section 22 - libglade)

      Comment

      • py

        #4
        Re: XML GUI

        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?

        Comment

        • dcrespo

          #5
          Re: XML GUI

          All about wxPython, the cross-platform GUI toolkit for the Python language


          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

          Comment

          • Juergen Kareta

            #6
            Re: XML GUI

            py schrieb:[color=blue]
            > 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?
            >[/color]
            look at


            Comment

            • Brendan

              #7
              Re: XML GUI


              py wrote:[color=blue]
              > 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?[/color]

              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

              Comment

              • py

                #8
                Re: XML GUI

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

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

                Thanks

                Comment

                • jmdeschamps@gmail.com

                  #9
                  Re: XML GUI


                  Brendan wrote:[color=blue]
                  > py wrote:[color=green]
                  > > 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?[/color]
                  >
                  > 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[/color]

                  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


                  Good luck!

                  Comment

                  • William Park

                    #10
                    Re: XML GUI

                    py <codecraig@gmai l.com> wrote:[color=blue]
                    > 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.[/color]

                    If you're talking about simple "dialog" thing, where you ask question
                    and users respond, then take a look at


                    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 <opengeometry@y ahoo.ca>, Toronto, Canada
                    ThinFlash: Linux thin-client on USB key (flash) drive

                    BashDiff: Super Bash shell
                    Compare the best free open source Software Development Software at SourceForge. Free, secure and fast Software Development Software downloads from the largest Open Source applications and software directory

                    Comment

                    • Jarek Zgoda

                      #11
                      Re: XML GUI

                      py napisa³(a):
                      [color=blue]
                      > 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?[/color]

                      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.

                      --
                      Jarek Zgoda

                      Comment

                      Working...