title: How to start a script from another script in python
body: <p>I have created a script that checks if some other script is running</p>
  
  <pre><code>import os
  import datetime
  import time
  from time import ctime
  
  statinfo = os.stat('nemo_logs/nemo_log_file_' + time.strftime('%Y-%m-%d') + '.txt')
  for i in range(1):
      first_size = statinfo.st_size
      time.sleep(10)
      if statinfo.st_size &gt; first_size:
          print("SCRIPT IS RUNNING")
      else:
          print("SCRIPT IS NOT RUNNING. TRYING TO KILL THE SCRIPT...")
          os.system("pkill -9 -f selenium_nemo.py")
          print("SCRIPT KILLED. TRYING TO RESTART THE SCRIPT...")
          os.system("python selenium_nemo.py")
          print("SCRIPT STARTED")
  </code></pre>
  
  <p>If the script logs are increasing then we are OK, but if the script has stuck for some case i want to stop it and restart the script once more.
  First i kill the script and then i'am executing <code>os.system("python selenium_nemo.py")</code> . The script starts but it runs inside my main script. How i can i start the <code>selenium_nemo.py</code> on another proccess?
  'The for loop is for later'</p>
  
  <p>Thanks</p>