def displayDemoMsg(msg, displaySerial=1): if displaySerial: for ch in msg: sys.stdout.write('\x1b[6;34;46m' + ch + '\x1b[0m') sys.stdout.flush() sleeping(0.05) else: sys.stdout.write(msg) sys.stdout.flush() sleeping(2)
def displayDemoMsg(msg): for ch in msg: sys.stdout.write('\x1b[6;34;46m' + ch + '\x1b[0m') sys.stdout.flush() sleeping(0.05)
def demoDisplay(msg): sys.stdout.write(msg) sys.stdout.flush() sleeping(2)
def sleep(n): sleeping(n) print("我睡了%d秒" % n) return n