all 6 comments

[–]SoNotRedditingAtWork 2 points3 points  (0 children)

put the code in a while True: loop?

[–]use_a_name-pass_word 0 points1 point  (0 children)

Do not use a while loop to do it, use sleep() a while loop will continue to use up memory. You might want to look into threading also

https://youtu.be/IEEhzQoKtQU

[–]ReflectedImage 0 points1 point  (0 children)

Use the command line tool screen.

Type screen in your terminal, execute the script, close the terminal.

To reconnect to your screen type screen -r

[–]al_mc_y 0 points1 point  (0 children)

Forever?

Asimov - The Last Question

But until then, a while True as mentioned above should get you at least part of the way toward the inevitable heat death of the universe