from time import sleep
a = 30
text = ""
source = pd.read_csv("questions.csv")
questions = source["questions"]
for i in questions:
try:
print(i)
text = text.join(i)
except TypeError:
pass
print(len(text) / 60 / a)
def plan3():#env):
for i in range(len(text)):
b = text[(i * a):(i * a) + a]
print(b, end="")
sleep(1)
plan3()
I am trying to make ^ work, but the screen doesn't update until I manually cancel the program with KeyboardInterrupt
.
I believe it is due to the way sleep()
is coded that makes it perform the function for the required amount of time, so I am unable to change this property.
The csv file has a database of questions, it can be swapped for a large string value and still it will not update "dynamically", if I am using the word correctly.
I need the questions to print like a printer, line by line on the screen on the TERMINAL.
setting print("",flush = True)
didn't solve for python 3.8