title: Problem creating a python windows executable with pyinstaller - creates, runs but quits immediately
body: <p>I have the sample python code below.  I create a windows executable app using PYINSTALLER.  When it runs, it immediately quits.  What should I be doing?</p>
  
  <p>I also tried a basic (default) flask app - I get the same effect.  I don't see any errors - just the window opens and closes immediately.  I have searched all over for solutions - the stackoverflow ar <a href="https://stackoverflow.com/questions/48979399/python-script-executable-crashes-immediately">Python script executable crashes immediately</a> does not help.  I am sure smart people have already solved this.  Please help</p>
  
  <pre><code>import sys
  import zerorpc
  
  
  class Api(object):
      def echo(self, text):
          """echo any text"""
          return text
  
  
  def main():
      addr = 'tcp://127.0.0.1:4242'
      s = zerorpc.Server(Api())
      s.bind(addr)
      print('start running on {}'.format(addr))
      s.run()
  
  
  if __name__ == '__main__':
      main()
  </code></pre>