1
當我運行在Windows命令提示或Linux終端以下Python 3代碼:回車在Eclipse和在命令提示不同的行爲
for i in range (10):
print('Step {0}'.format(i), end='\r', flush=True)
print('everything is done', flush=True)
的輸出是:
everything is done
然而,當我在Eclipse中運行相同的代碼,輸出爲:
Step 0
Step 1
Step 2
Step 3
Step 4
Step 5
Step 6
Step 7
Step 8
Step 9
everything is done
什麼能解釋一下嗎?我使用Eclipse Standard/SDK,版本:Kepler Release,Build id:20130614-0229。