Easy-to-use Python GUI
fetchinson at googlemail.com
Thu Dec 25 05:31:44 CET 2008
> Is there an easy-to-use, "function"-based cross-platform GUI toolkit for
> Python out there that's a little more sophisticated than EasyGui? EasyGui
> looks good, but it's a little more restrictive than what I'd like to have,
> I'm (stubbornly :-) ) resistant to stepping up to a "full service" GUI
> such as pyGTK or wxPython where it's all about event loops and callbacks and
> you need to start planning how the GUI affects the overall program flow
> than just using a "forms" (or "Wizard")-type approach where you put up a few
> dialogs, users fill in some variables, and your program just sits around
> waiting until "OK" or "Cancel" is clicked.
> One approach that I like comes from SAX BASIC/WinWrap, which is more or less
> clone of Microsoft's Visual BASIC for Applications, but they (apparently)
> wanted everything to still be human-readable, so they have a simple GUI
> ("form") builder that generates code that looks like this:
> Begin Dialog UserDialog 850,497,"Export Control" ' %GRID:10,7,1,1
> GroupBox 20,7,360,217,"Drill File Generation",.GroupBox1
> CheckBox 40,35,130,14,"Output drill file(s)",.genDrill
> Text 40,63,270,28,"Identify via layers as any that contain this text in
> their names:",.Text
> TextBox 40,98,220,21,.viaLayerName
> Text 40,140,100,14,"Output method:",.Text8
> DropListBox 160,140,180,21,DrillStyle(),.drillStyle
> Text 40,175,130,28,"Select drill table units:",.Text2
> ListBox 200,175,120,28,unitNames(),.unitName
> OKButton 310,469,90,21
> CancelButton 410,469,90,21
> End Dialog
> ' GUI builder generates or modifies everything above, but can also be edited
> by hand
> ' You write the following code...
> Dim dlg As UserDialog
> dlg.genDrill = 1
> ReDim DrillStyle(1)
> DrillStyle(0) = "All Via Layers In One File"
> DrillStyle(1) = "One File Per Via Layer"
> dlg.drillStyle = 1
> This is pretty darned easy for me understand and modify either by hand or
> the GUI builder. Still, it's quite powerful, since it supports all the
> GUI elements (text, group boxes, checkboxes, drop-down lists, text boxes,
> buttons, etc.). This is about the level of sophistication I'm looking for.
> Anything like this for Python?
How about the Tcl/Tk GUI that comes bundled with python?
Psss, psss, put it down! - http://www.cafepress.com/putitdown
More information about the Python-list