for a test case, it's not enough to send one character at a time. You also have to add some delay in the middle (time.sleep(0.1) once every 10 characters seem to do the trick).
The test case:
-----------------8<-----------------8<-----------------8<-----------------8<-----------------8<-----------------
import sys
import time
chars = 0
for char in "\033[23;01H2.0 \033[1m\033[33m\033[40mShell> \033[0m\033[37m\033[40m":
sys.stdout.write(char)
sys.stdout.flush()
chars += 1
if chars % 10 == 0: time.sleep(0.1)
-----------------8<-----------------8<-----------------8<-----------------8<-----------------8<-----------------
for a test case, it's not enough to send one character at a time. You also have to add some delay in the middle (time.sleep(0.1) once every 10 characters seem to do the trick).
The test case:
------- ------- ---8<-- ------- ------- -8<---- ------- ------8< ------- ------- ---8<-- ------- ------- -8<---- ------- ------
import sys
import time
chars = 0 033[33m\ 033[40mShell> \033[0m\ 033[37m\ 033[40m" : stdout. write(char) stdout. flush()
time.sleep( 0.1) ------- ---8<-- ------- ------- -8<---- ------- ------8< ------- ------- ---8<-- ------- ------- -8<---- ------- ------
for char in "\033[23;01H2.0 \033[1m\
sys.
sys.
chars += 1
if chars % 10 == 0:
-------