title: Opening another tkinter window from one tkinter window
body: <p>I have a Tkinter window in the file gui.py. Upon the press of the Spacebar, I want to open another Tkinter window which is used to obtain an input from the user via the file imageinput.py.</p>
  
  <p>So, I wrote the code to execute the run function of imageinput.py </p>
  
  <pre><code>def keyPressed(event, data):
      if event.keysym == "space": image_run()
  </code></pre>
  
  <p>When I run this, I get the following error:<a href="https://i.stack.imgur.com/tyL7s.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tyL7s.jpg" alt="enter image description here"></a></p>
  
  <p>What is the best way to open such another Tkinter window this way?</p>