title: Python stompest and yield
body: <p>I'm having problems with using the Python Stompest library to yield frames as they arrive. When I include the <code>yield</code> keyword in the function, the code does not block and wait for a frame like it should.</p>
  
  <pre><code>def receive(stomp):
      received_messages = 0
      while True:
          frame = stomp.receiveFrame()
          stomp.ack(frame)
          yield frame.body
  </code></pre>
  
  <p>However, if all I do is print the frame body, then it waits like it should</p>
  
  <pre><code>def receive(stomp):
      while True:
          frame = stomp.receiveFrame()
          stomp.ack(frame)
          print frame.body
  </code></pre>
  
  <p>Is there something wrong with using <code>yield</code> in this context?</p>