title: OpenCV -> Python - image window does not close
body: <p>I need the user input after showing an image, but the problem is that the image window will not close and will freeze. Do you have some solution or alternative that I can use to get the user input?</p>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>import cv2
  
  img = cv2.imread("begin.jpg")
  cv2.imshow("test",img)
  cv2.destroyAllWindows()
  raw_input("test:")
  </code></pre>
  
  <p><strong>Problem:</strong> Window that show image will not close</p>
  
  <p><strong>Cause:</strong> raw_input(). Removing the raw_input() the window closes as expected.</p>
  
  <p><strong>I expect more than one character from the user.</strong></p>
  
  <p>Thank you so much</p>