title: What's the simplest cross-platform way to pop up graphical dialogs in Python?
body: <p>I want the simplest possible way to pop up simple dialogs in Python scripts.  Ideally, the solution would:</p>
  
  <ul>
  <li>Work on Windows, OS X, Gnome, KDE</li>
  <li>Look like a native dialog on any OS</li>
  <li>Require minimal code</li>
  </ul>
  
  <p>To pop up a simple standard dialog should require only minimal code.  Essentially you're just saying "Pop up a standard dialog with this text", or "Pop up a dialog with question x and feed response into variable y".</p>
  
  <p>This is for simple scripts that would otherwise run on the command line.  I don't want to know about GUI frameworks or have to set up code that says "start a GUI thread, register an event handler, configure some window properties, run a loop", etc.  I don't want to have to set up a window or close the window afterward.  I give it the text to put in the window and/or buttons and/or checkboxes, it returns what the user clicked on.  Everything else should be taken care of automatically.  For example:</p>
  
  <pre><code>message_box('File conversion complete')
  </code></pre>
  
  <p>for a standard dialog box with an "Ok" button, or</p>
  
  <pre><code>balloon_tip('File conversion complete')
  </code></pre>
  
  <p>for a system tray popup balloon, or</p>
  
  <pre><code>format = button_box('Which file format do you want?', 'JPG', 'PNG')
  </code></pre>
  
  <p>and they press one of the two buttons, and then <code>format</code> equals <code>'JPG'</code>, or</p>
  
  <pre><code>response = text_query('What would you like to name the file?')
  </code></pre>
  
  <p>and after they type in the box and press Ok, <code>response</code> now equals <code>'bananas.txt'</code>.  No other code required.  No ugly command line prompts for the poor user.</p>
  
  <p>I've listed Zenity and EasyGUI as example answers, since they're similar to what I want, but not perfect.</p>
  
  <p>[<a href="http://www.python-forum.org/pythonforum/viewtopic.php?f=4&amp;t=12276" rel="noreferrer">Previously asked on Python Forum</a>]</p>