Looking for a basic GUI tutorial

Kevin Altis altis at semi-retired.com
Tue May 6 12:06:48 EDT 2003


You might try looking at some of the links from a Google search to get a
broad overview

  http://www.google.com/search?q=event+driven+programming

If you add Python to the search you'll narrow the list down further, so
these may be the kind of answer you're looking for:


http://home.att.net/~stephen_ferg/projects/ferg-event_driven_programming.htm
l

  http://www.freenetpages.co.uk/hp/alan.gauld/tutevent.htm

Stephen Ferg who wrote the "Introduction to Event-Driven Programming" above
also wrote the EasyGUI package which lets you use a GUI for input and output
but avoid the normal GUI event loop since all input and output is modal.

  http://home.att.net/~stephen_ferg/projects/

I'll also take this time to plug my own project <wink> since you are looking
for a simple way to get an interactive, event driven GUI running. The first
two tutorials by Dan Shafer on the PythonCard documentation page walk you
step-by-step through the creation process using PythonCard.

  http://pythoncard.sourceforge.net/documentation.html

 ka
---
Kevin Altis
altis at semi-retired.com
http://altis.pycs.net/
http://www.pythoncard.org/

"Russ Schmidt" <SchmidtRW at y12.doe.dov> wrote in message
news:Xns937371E52A7C8RWSBWXTY12DOEGOV at 160.91.22.101...
Help!

I have been following the various GUI threads with some interest, and am
hoping that you can point me to an appropriate reference source (book, web
site, whatever). I have been trying to pick up Python in my spare time, and
while I can program simple stuff, I have concluded that I just have no clue
as to what truly interactive (GUI) programming is all about.

As background, I am a Fortran programmer. I learned in the 70s on punched
cards, and used it extensively in the 80s. I have since dabbled a bit with
Perl, VBA, and Python, doing useful stuff but basically writing Fortran
programs: you set up the input, hit "Go", and wait for the answer. Python
is great for this, but I would like to expand and put a useful interactive
front end on the things I create.

I have tried John Grayson's "Python and Tkinter Programming", but that book
had me nearly screaming in frustration at it's lack of explanation. It
tells me that a mainloop is necessary to start the Tkinter event loop, but
there is no discussion about what an event loop is, or how it works, or why
I should care other than "you have to do it this way or it won't work". I
am really bad at cargo-cult programming (just stick these pieces in and it
will work) - I need to understand what is going on and why something is
required, then I can expand on things pretty well.

Most of the references I have come across are more about Object-Oriented
Programming, which is often linked to interactive programming but is not
the same thing. I think I understand what classes and objects are, and can
see some of the value in encapsulating and re-using code and data
structures. What I really don't understand is how to set up a truly
interactive program, and why it needs to be that way. Any references you
can send my way will be appreciated.

Thanks for your help.

Russ
--
Russ Schmidt       (idt at y12.doe.gov)
BWXT Y-12 L.L.C.
Oak Ridge, Tennessee     37831-2009






More information about the Python-list mailing list