Skip to content

Instantly share code, notes, and snippets.

Created June 6, 2017 17:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/56697c4b1ab17841337e20c7bf9340dc to your computer and use it in GitHub Desktop.
Save anonymous/56697c4b1ab17841337e20c7bf9340dc to your computer and use it in GitHub Desktop.
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