Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
sys.stdout.flush() は aptana では機能しません。私はもう試した :
import sys import time for count in range(100) : sys.stdout.write("\r" str(count) + "%") sys.stdout.flush() time.sleep(1)
フラッシュは aptana では機能しません。私は次のようなものを持っています:
1% 2% 3% ....
ありがとう
問題はフラッシュではなく、'\r' をコンソールに出力することです。Aptana は PyDev を使用しており、PyDev の端末は実際のものではありません。PyDev のコンソールを扱う SO には多くの 質問があります。PyDev のコンソールはこれを処理するためのものではなかったようです。あなたの最善の策は、実際のコンソールでこれを試すことです.