title: Error in a minimal tkSimpleDialog example
body: <p>I was trying out a python code example at <a href="http://rosettacode.org/wiki/User_input/Graphical#Python">Rosetta Code</a> - a <a href="http://en.wikipedia.org/wiki/Chrestomathy">programming chrestomathy</a> site, where solutions to the same task are presented in as many different programming languages as possible. For this task, the goal is to input a string and the integer 75000, from graphical user interface. The code is shown below:</p>
  
  <pre><code>import tkSimpleDialog
  
  number = tkSimpleDialog.askinteger("Integer", "Enter a Number")
  string = tkSimpleDialog.askstring("String", "Enter a String")
  </code></pre>
  
  <p>However, when I try to run the code, I get the following error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\Users\vix\Documents\.cache\GUIexample.py", line 3, in &lt;module&gt;
      number = tkSimpleDialog.askinteger("Integer", "Enter a Number")
    File "C:\Python27\lib\lib-tk\tkSimpleDialog.py", line 262, in askinteger
      d = _QueryInteger(title, prompt, **kw)
    File "C:\Python27\lib\lib-tk\tkSimpleDialog.py", line 189, in __init__
      Dialog.__init__(self, parent, title)
    File "C:\Python27\lib\lib-tk\tkSimpleDialog.py", line 53, in __init__
      if parent.winfo_viewable():
  AttributeError: 'NoneType' object has no attribute 'winfo_viewable'
  </code></pre>
  
  <p>Where could the problem be?</p>
  
  <p>Thanks</p>