title: How to properly implement tkMessageBox in Python3.4?
body: <p>I want to launch a warning using tkMessageBox in Python3. This warning is supposed to launch when a user doesn't select an element from a listbox. Unfortunately whenever I try to implement message box it does not launch like it is supposed to. I have code for a script called pietalkgui.py which contains the code where I want to implement the message box:</p>
  
  <pre><code>from tkinter import messagebox
  
  # Gives warning if no user is selected for whisper
  def whisperwarning(self):
      # show warning to user
      showwarning("Select User","Select a user to whisper to!")
  
  # Handles whisper
  def whispermessage(self):
      # stores element selected in temp variable
      temp = self.userslist.get(self.userslist.curselection())
       # if no item is selected from userslist (listbox)
      if temp == "":
          # launch warning to user if no item is selected
          self.whisperwarning()
      else:
          # retrieves usernames from userslist
          username = temp
          # storing whisper
          outwhisper = ' /w "' + username +'" ' + self.messagebox.get("0.0",END)
          # handling whisper
          self.handler(outwhisper)
          # erase message in message box
          self.messagebox.delete("0.0",END)
  </code></pre>
  
  <p>Am I doing something wrong in the implementation of tkMessageBox? Or am I not properly checking if not item is selected from the listbox?</p>