title: Graceful way to run subscripts in Python
body: <p>I have a main script which imports a number of subscripts and runs them. No output is needed to return to the main script.</p>
  <p>I'm wondering if there's a better way of running the subscripts. I run the main file with a bat file. If there's an error in any of the subscripts, the script ends with running the full list of subscripts. I tried using a try: except: block loop for each script but it doesn't prevent early exit from the main script.</p>
  <p>Is it better to use something like exec or execfile()</p>
  <pre class="lang-py prettyprint-override"><code>from a import b
  from c import d
  
  script_list = [a(),b()]
  
  for script in script_list:
      script
  </code></pre>