If you want a code to run continuously in the background, you will need to change the file extension
from .py in .pyw
Before running the script you need to do the following:
From the CMD (command prompt) console, run the command: pip install pythonw