title: Python/Pyglet on linux, script exits immediately
body: <p>I am trying to start programming with pyglet on my lubuntu laptop. The script exits immediately. 
  It shows a black window that disappears within 1 second. I don't see any errors.
  Am I doing anything wrong or is there any additional software that needs to be installed.</p>
  
  <p>I tried 3 scripts that I scavenged from the internet. 
  The second is similar to the first, I removed the Microsoft font line.<br>
  Also replacing "Times New Roman" with "Ubuntu", an installed linux font, does not make a difference.</p>
  
  <pre><code>import pyglet
  window = pyglet.window.Window()
  label = pyglet.text.Label('Hello, world',
                            font_name='Times New Roman',
                            font_size=36,
                            x=window.width//2, y=window.height//2,
                            anchor_x='center', anchor_y='center')
  @window.event
  def on_draw():
      window.clear()
      label.draw()
  pyglet.app.run()
  
  ################################################################
  
  import pyglet
  window = pyglet.window.Window()
  label = pyglet.text.Label('Hello, world',
                            font_size=36,
                            x=window.width//2, y=window.height//2,
                            anchor_x='center', anchor_y='center')
  @window.event
  def on_draw():
      window.clear()
      label.draw()
  pyglet.app.run()
  
  ###############################################################3
  
  import pyglet
  class HelloWorldWindow(pyglet.window.Window):
      def __init__(self):
          super(HelloWorldWindow, self).__init__()
          self.label = pyglet.text.Label('Hello, world!')
      def on_draw(self):
          self.clear()
          self.label.draw()
  if __name__ == '__main__':
      window = HelloWorldWindow()
  pyglet.app.run()
  </code></pre>
  
  <p>The python shell window shows the same output on each of the attempts:</p>
  
  <pre><code>Python 2.7.12+ (default, Sep 17 2016, 12:08:02) 
  [GCC 6.2.0 20160914] on linux2
  Type "copyright", "credits" or "license()" for more information.
  &gt;&gt;&gt; 
  ========== RESTART: /home/hennep/Desktop/pyglet/hello.py ==========
  
  =============================== RESTART: Shell ===============================
  &gt;&gt;&gt;  
  </code></pre>
  
  <p>The next snippet works without the commented line. When I uncomment the line, same problem<br>
  So I am unable to use pyglet.text.Label.  </p>
  
  <pre><code>import pyglet  
  window = pyglet.window.Window(width=320, height=200,caption='window')  
  #label = pyglet.text.Label('Hello, world')  
  pyglet.app.run()  
  </code></pre>