title: Setting stacksize in a python script
body: <p>I am converting a csh script to a python script. The script calls a memory-intensive executable which requires a very large stack, so the csh script sets the stacksize to unlimited:</p>
  
  <pre><code>limit stacksize unlimited
  </code></pre>
  
  <p>When I try to reproduce this script in python, I execute them in a very naive manner, using <code>os.system</code>, e.g.:</p>
  
  <pre><code>os.system('some_executable')
  </code></pre>
  
  <p>But I do not know how to tell the OS to run these executables with unlimited stacksize. Is there a way to specify stacksize for calls within a python script? Is there some low-level system call that I should be using? And is there a module (similar to shutil) which controls this?</p>