<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
WW, <br>
&nbsp;&nbsp;&nbsp; good. Thanks. <br>
destroy() took care of it, but I wonder what advantage there was to
Quit()?<br>
WW<br>
<br>
W W wrote:
<blockquote
 cite="mid:333efb450903031222k4e44841cr8215a1cb63e44859@mail.gmail.com"
 type="cite">
  <pre wrap="">On Tue, Mar 3, 2009 at 1:54 PM, Wayne Watson
<a class="moz-txt-link-rfc2396E" href="mailto:sierra_mtnview@sbcglobal.net">&lt;sierra_mtnview@sbcglobal.net&gt;</a> wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">&lt;snip&gt;
BTW, the Quit function is original but doesn't kill the window when Quit is
used. What fixes that? For more bonus points, it seems as though the try
statement in the dialog should really bring up an "Error" dialog saying
something is wrong, when an invalid entry occurs. No need to construct an
error dialog for me, but I'd be curious how it might be handled.
&lt;snip&gt;
    </pre>
  </blockquote>
  <pre wrap=""><!---->


For the error dialog you can easily use tkMessageBox:

just import tkMessageBox and then use this:

In [2]: tkMessageBox.showerror('Some Error', 'An Error occurred!')
Out[2]: 'ok'

If you're expecting a specific error you can use

try:
    #some statements
except SpecificError:
    #Handle the error

In this case (at least the block I looked at) it's just printing to
the command line. You can handle it using any one of the message boxes
or creating your own.

  </pre>
  <blockquote type="cite">
    <pre wrap="">&nbsp;&nbsp;&nbsp; def Quit(self):
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.running = False
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.master.quit()
&lt;snip&gt;
    </pre>
  </blockquote>
  <pre wrap=""><!---->
You could also try self.master.destroy()

when I tried:

from Tkinter import *
root = Tk()
root.quit()

in an ipython session. It didn't close my root window but the destroy
method did.

HTH,
Wayne

  </pre>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<meta content="text/html;" http-equiv="Content-Type">
<title>Signature.html</title>
<pre class="moz-signature" cols="76">           Wayne Watson (Watson Adventures, Prop., Nevada City, CA)

             (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time)
<font color="#330099">            </font>
<span style="font-weight: bold;"></span><b><b
 style="color: rgb(204, 51, 204);" class="b"><span
 style="color: rgb(255, 153, 255);"></span><span
 style="font-family: monospace;"></span></b></b>
                <font class="sqq">&#8220;<a class="sqq"
 href="http://thinkexist.com/quotation/in_mathematics_you_don-t_understand_things-you/346035.html">In mathematics you don't understand things. </a>
                 <a class="sqq"
 href="http://thinkexist.com/quotation/in_mathematics_you_don-t_understand_things-you/346035.html">You just get used to them.</a>&#8221; -- John Von Neumann
                    (P.S. The same is true in life.)
</font></pre>
<div style="margin-left: 40px;">
<b><b style="color: rgb(204, 51, 204);" class="b"><span
 style="font-family: monospace;"></span></b></b></div>
<pre class="moz-signature" cols="76"><b><b
 style="color: rgb(204, 51, 204);" class="b"><span
 style="font-family: monospace; color: rgb(153, 51, 153);"></span></b></b><b
 style="color: rgb(204, 51, 204);" class="b"><span
 style="font-family: monospace; color: rgb(153, 51, 153);"></span></b><span
 style="color: rgb(153, 51, 153);"></span><span
 style="color: rgb(153, 51, 153);">
</span><span style="color: rgb(153, 51, 153);"></span><b
 style="color: rgb(204, 51, 204);" class="b"><span
 style="font-family: monospace;"></span></b><span
 style="color: rgb(204, 51, 204);"></span>                    Web Page: &lt;<a class="moz-txt-link-abbreviated" href="http://www.speckledwithstars.net/">www.speckledwithstars.net/</a>&gt;</pre>
</div>
</body>
</html>