Created
June 6, 2017 17:21
-
-
Save anonymous/56697c4b1ab17841337e20c7bf9340dc to your computer and use it in GitHub Desktop.
This file contains 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
import time | |
while True: | |
print(int(time.time())) | |
time.sleep(1); | |
# подимаемся на две строчки вверх - т.к. print() добавляет | |
# перевод строки. | |
# print() заенкодит строку в utf-8 (т.к. в python3 он принимает | |
# строку, а ОС и терминал хотят байты). '\u001B' станет b'\x1B', | |
# что нам и надо | |
print('\u001B[2A') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment