0
내 파이썬 시계가 파이썬 2에서만 실행되는 이유는 무엇입니까?백 스페이스 문제
from __future__ import print_function
import time
wipe = '\b'*len(time.asctime())
print("The current date and time are: "+' '*len(wipe), end='')
while True:
print(wipe+time.asctime(), end='')
time.sleep(1)
사실, 이것은 또한 Python 2.x에서 필요합니다 (최소한 print 함수를 사용할 때). –
내 시스템에서는 Python 2에서도이 기능이 작동하지 않습니다. –
내 시스템 (Windows 7 x64)에서는 Python 2.7에서이 기능이 작동하지 않습니다. –