title: How to suppress the carriage return in python 2?
body: <pre><code>        myfile = open("wrsu"+str(i)+'_'+str(j)+'_'+str(TimesToExec)+".txt",'w')
          sys.stdout = myfile
          p1 = subprocess.Popen([pathname,"r", "s","u",str(i),str(j),str(runTime)],stdout=subprocess.PIPE)
          output = p1.communicate()[0]
          print output,
  </code></pre>
  
  <p>When I use this to redirect the output of a exe to my own file, it always</p>
  
  <p>a carriage return after each line, How to suppress it?</p>