In article <[email protected]>,
 "Russell E. Owen" <[email protected]> wrote:

> I am trying to convert a cross-platform Python/Tkinter application to 
> use Twisted and have run into a problem: at least on MacOS X I can no 
> longer quit the application.
>....
> """Script showing failure-to-quit bug...""
> import Tkinter
> import twisted.internet.tksupport
> 
> root = Tkinter.Tk()
> twisted.internet.tksupport.install(root)
> reactor = twisted.internet.reactor
> 
> reactor.run()

Just after posting this Kevin Walzer provided an answer. The Quit menu 
on MacOS X calls the tcl "exit" function. One can easily intercept this 
in Python/Tkinter using createcommand, e.g.:

    def myQuit():
        reactor.stop()

    root.createcommand('exit', myQuit)

-- Russell


_______________________________________________
Twisted-Python mailing list
[email protected]
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to