If I want to use the print with the comma (2.6), it works fine as long as you don't use time.sleep().
If you use the print with the comma, and then invoke sleep; the string will never print, if you are in a loop.
Example:
a=1
b=10
while a<b:
print "yes",
a=a+1
This works, you will see yes printed on the same line for 10 times. But this won't work.
a=1
b=10
while a<b:
print "yes",
time.sleep(1)
a=a+1
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.
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.
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.
Is this a bug in the print function?