I am new in Python, and I hope that someone can help me. I have the main loop. IN this loop I want to use data from a file. The main problem, that I need to do this without blocking all the system in between.
Example:
f=open("./filename.txt", "r")
while True:
a=f.readline()
print("Data: %s" %(a))
time.sleep(1)
Output for example
Data: Hello
Data: Hello
Data: Hello
...
Until new data
Is it possible? I will be so appreciated for this. Any examples and help, please. Thanks.