Created
April 29, 2013 18:56
-
-
Save 89465127/5483820 to your computer and use it in GitHub Desktop.
Printing to a single line in Python, in separate steps, flushing output.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function | |
import sys | |
import time | |
print('Executing...', end='') | |
sys.stdout.flush() | |
time.sleep(2) | |
print('Done.') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment