title: Subprocess.popen multiple scripts - wait for each script to finish
body: <p>I have a problem executing multiple scripts with subprocess in python and Rhino. I want to import dxf/xyz files, rename layers and split the objects. The 3 scripts work individually but when executed via subprocess, the script for bbox-splitting starts running before renaming the layers has finished, hence isn’t working properly. Any idea how to wait for each script to finish before starting the next one?</p>
  <pre><code>script_call_dxf = &quot;_-RunPythonScript {} &quot;.format(dxf_script_path)       
  script_call_xyz = &quot;_-RunPythonScript {} &quot;.format(xyz_script_path)
  script_call_bbox = &quot;_-RunPythonScript {} &quot;.format(bbox_script_path)
  
  call_script = '&quot;{0}&quot; /nosplash /runscript=&quot;{1} {2} {3}&quot;, &quot;{4}&quot;'.format(rhino_path, script_call_xyz, script_call_dxf, script_call_bbox, rhino_file)
  
  subprocess.run(call_script)
  </code></pre>