Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Tkinter on mac - Binding command-q to quit application

Reply
Thread Tools

Tkinter on mac - Binding command-q to quit application

 
 
Brandon
Guest
Posts: n/a
 
      11-26-2005
Hi All,

I'm attempting to develop a Tcl/Tk application on the mac using python
and Tkinter. The one problem I'm having is adding basic keyboard
support to my application, specifically binding command-q so that it
quits the application (this is standard behavior for almost every mac
application, the equivalent of alt-f4 on windows). Has anyone
successfully been able to do this? If so, could you please share some
code which demonstrates how?


If it matters, I've been working with both python 2.3.5 and python
2.4.1:

>>> print sys.version; print "-"*30; print Tkinter.__version__

2.3.5 (#1, Aug 22 2005, 22:13:23)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1809)]
------------------------------
$Revision: 1.177 $

and on python 2.4:

>>> print sys.version; print "-"*30; print Tkinter.__version__

2.4.1 (#2, Mar 31 2005, 00:05:10)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1666)]
------------------------------
$Revision: 1.181.2.1 $


Thanks in advance,
Brandon

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Quit menu notification with SWT on Mac OS X ? Patrick Stadelmann Java 7 05-19-2008 11:07 AM
win32ole: application.quit() leave process running Todd Burch Ruby 8 07-30-2007 11:56 AM
Appropriate way to quit Tkinter mzdude Python 5 10-13-2006 05:54 PM
Memory exception with Tkinter root.quit Jane Austine Python 3 11-18-2003 03:59 PM
Memory exception with Tkinter root.quit Jane Austine Python 1 11-18-2003 01:51 AM



Advertisments