How to know whether a window with a given title is already open in Tk?
<p>Iâve writen a little python script that just pops up a message box containing the text passed on the command line. I want to pop it up only when the window âresulting from a previous callâ is not open.</p>

<pre><code>from Tkinter import *
import tkMessageBox

root = Tk()
root.withdraw() 

# TODO not if a window with this title exists
tkMessageBox.showinfo("Key you!", " ".join(sys.argv[1:]))
</code></pre>

<p>Any idea how to check that?</p>

<p>I believe you want:</p>

<pre><code>if 'normal' != root.state():
    tkMessageBox.showinfo("Key you!", " ".join(sys.argv[1:]))
</code></pre>
