[Tutor] gui questions

alan.gauld@bt.com alan.gauld@bt.com
Thu, 28 Feb 2002 10:55:48 -0000

> ...  I want to use some sort of gui.  Would it be 
> better for me to start out using curses or tkinter?  

Of those two I'd go with Tkinter. For a start curses is 
a primitive (albeit useful) way of providing GUI like 
facilities on a text terminal - its not a real GUI.

> ...  Would wxpython be a choice also, or is it very 
> much harder?

Personally I find it harder, but it does go further in 
that it has a richer widget set and some people prefer 
its look. Tkinter has nmore beginners documentation but 
if you already know C++ then wxWindows is adequately 
documented. If you don't read C++ then I'd say learn 
Tkinter first.

You can quickly compare by running through my tutor's 
GUI page which shows Tkinter then concludes with the 
same program in wxPython - they are not much different 
- in fact they have exactly the same number of lines!

> Also, should I start writing my program for the gui 
> from the start or write the basic functionality and 
> a simpler interface then add the gui

I always try to do a command line version first so that 
I concentrate on the function rather than the cosmetics.
This usually leads to a more reusable solution too as it 
separates the function from the display - A Good Thing(TM)

See the Case Study on my tutor for an example of how that 
can be done...

Alan g.
Author of the 'Learning to Program' web site
( Who got himself suspended from the mailing list for 
  some reason and only realised yesterday...)