title: How do I execute more code after closing a PyQt window?
body: <p>Here's an example below:</p>
  
  <pre><code>if __name__ == '__main__':
      import sys
      if (sys.flags.interactive != 1) or not hasattr(QtCore, 'PYQT_VERSION'):
          QtGui.QApplication.instance().exec_()
      print "you just closed the pyqt window!!! you are awesome!!!"
  </code></pre>
  
  <p>The print statement above doesn't seem to get executed while the window is open or after I close the window. I want it to print after I close the window.</p>