title: Python sleep() inhibit print with comma?
body: <p>If I want to use the print with the comma (2.6), it works fine as long as you don't use time.sleep().</p>
  
  <p>If you use the print with the comma, and then invoke sleep; the string will never print, if you are in a loop.</p>
  
  <p>Example:</p>
  
  <pre><code>a=1
  b=10
  while a&lt;b:
      print "yes",
      a=a+1
  </code></pre>
  
  <p>This works, you will see yes printed on the same line for 10 times.
  But this won't work.</p>
  
  <pre><code>a=1
  b=10
  while a&lt;b:
      print "yes",
      time.sleep(1)
      a=a+1
  </code></pre>
  
  <p>The expectation is that there will be a yes printed; then there is a second of wait, and then the next yes will be printed. Instead, you will see a string of 10 yes printed after 10 seconds.</p>
  
  <p>Same goes if you use while loop; as long as the loop is running, and you have a sleep statement, the string won't print until the end. </p>
  
  <p>To make it work, remove the comma.
  This makes impossible to print a string on the same line, if you want to specify how long you want to wait between each string. </p>
  
  <p>Is this a bug in the print function?</p>