title: How to run multiple infinitely looping Python scripts simultaneously
body: <p>I have a python project which consist of 3 Python scripts that have run indefinitely, and I would like to run them simultaneously. They are:</p>
  
  <ul>
  <li>web.py: Is a Flask application which will be running forever as the control panel of the project.</li>
  <li>pir.py: Is a script that whatchess the motion sensor to go HIGH, does some stuff, and then keeps looping till the sensor goes HIGH again.</li>
  <li>keypadd.py: Is in a loop till the keypad goes HIGH, reads passcode combinations, does some stuff and loops again.</li>
  </ul>
  
  <p>I tried to run those three files with sh in a shell script. But once the web.py runs, it seems like the other Python files are waiting in a queue untill web.py finish the job and then are going to be executed. But the web.py will never finish the job, because it keeps looping. I would like the scripts to be executed in this order: web.py, pir.py and then keypadd.py.</p>
  
  <p>How can I do that?</p>
  
  <p>Shell script I used:</p>
  
  <pre><code>#!/bin/sh
  # launcher.sh
  
  
  cd /home/pi/Ptoject
  sudo python web.py
  sudo python pir.py
  sudo python keypadd.py
  </code></pre>