title: How to Print in Python 2.7 without newline without buffering
body: <p>I have a need in Python 2.7 to print text to the console without newline characters, so I can continue writing more text on that same line later with future code. My current implementation involves importing the Python 3 print function from the future library, and using end=''.</p>
  
  <p>This is not ideal as if I print a line, such as:</p>
  
  <pre><code>print("We're doing something...",end='')
  </code></pre>
  
  <p>And then follow that with any other code, and then a line such as:</p>
  
  <pre><code>print("we finished doing that thing.")
  </code></pre>
  
  <p>The line gets printed, but it's all printed at once, meaning that it is buffered until it gets the print with the newline character in it. I would much prefer to be able to output the first print string to the console, execute other code, and then put in the part with the newline. I can't find anyway to do this with print in Python 2.7. Maybe someone can point me to a functional way to do this? Thanks.</p>
  
  <p>For those suggesting the environment buffering fixes it, it does not. It affects file output and some other miscellaneous things that have nothig to do with it. There is an answer below that is functional overall.</p>