Good morning. I created this function to send a notification and turn on a led but while the http page loads, the script blocks until it has finished loading the page. What can I enter in order to have the page load while the script continues?
def alm_dir():
print("HELP")
res = requests.get('http://192.168.1.171/LED=ON')
CodePudding user response:
Look into threading, this allows the script to start a function on the side and then continue running while the second function runs in the background
