title: Was the python script launched by mpirun or mpiexec?
body: <p>I've coded a python script that can be either launched in stand alone way or with mpi support.</p>
  
  <pre><code>python myscript.py
  </code></pre>
  
  <p>vs</p>
  
  <pre><code>mpirun -np 2 python myscript.py
  </code></pre>
  
  <p>How can I know inside the script in which way the script was launched to do some conditional operations?</p>