Some basic questions about Tkinter (probably v easy for experts!)

Martyn Quick mrq at for.mat.bham.ac.uk
Thu Feb 8 11:33:45 CET 2001


On Wed, 7 Feb 2001, Fredrik Lundh wrote:
> 
> have you read the introduction document?  the first chapter
> seems to answer your questions:
> 
> http://www.pythonware.com/library/tkinter/introduction/hello-tkinter.htm

Thanks very much for your answer Fredrik - I managed to get some menus
working last night, so I think I'm starting to get the hang of
things.  I'll try having a thorough re-read of the Introduction now that
I'm getting an idea of the syntax.

> > armadillo.add_command(lable="Exit", command=exit)
> 
> if you fix the typo, this adds a command item to the armadillo
> menubar.  when that item is selected, Tkinter calls sys.exit.

I've realized one point that was confusing me.
When I use sys.exit to finish a python script I would type

sys.exit()

but in the above you use  exit  rather than  exit().
Is it generally the case that you don't use the brackets in the
comannd=...  part?  (Sorry if this is easily to be found in the
Introduction document!)  Presumably this means that I can't use a command
which relies on parameters?

Thanks once again...

Martyn

--------------------------------------------------------
Dr. Martyn Quick  (Research Fellow in Pure Mathematics)
University of Birmingham, Edgbaston, Birmingham, UK.
http://www.mat.bham.ac.uk/M.R.Quick






More information about the Python-list mailing list