<p dir="auto"><em>Original ticket <a href="http://projects.scipy.org/scipy/ticket/1521" rel="nofollow">http://projects.scipy.org/scipy/ticket/1521</a> on 2011-09-16 by trac user SteveDoyle, assigned to unknown.</em></p>
<p dir="auto">Running the following program will always return an exit code of 0.</p>
<p dir="auto">import sys<br>
import scipy.interpolate as si<br>
sys.exit(2)</p>
<p dir="auto">This bug is probably similar ticket <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="13651552" data-permission-text="Title is private" data-url="https://github.com/scipy/scipy/issues/1840" data-hovercard-type="issue" data-hovercard-url="/scipy/scipy/issues/1840/hovercard" href="https://github.com/scipy/scipy/issues/1840">gh-1840</a>.</p>
<p dir="auto">I'm using scipy 0.7.1 with Python 2.6 on a Windows 7, 64-bit system.</p>
<p dir="auto"><em>Original ticket <a href="http://projects.scipy.org/scipy/ticket/1314" rel="nofollow">http://projects.scipy.org/scipy/ticket/1314</a> on 2010-10-18 by trac user markMiscavage, assigned to <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/wnbell/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/wnbell">@wnbell</a>.</em></p>
<p dir="auto">I have this bug in a larger program but I've narrowed it down to a script consisting of just :</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import sys
import scipy.sparse.sparsetools
sys.exit(&quot;EXIT&quot;)"><pre class="notranslate"><code class="notranslate">import sys
import scipy.sparse.sparsetools
sys.exit("EXIT")
</code></pre></div>
<p dir="auto">This will always exit with code 0. It seems it is the .pyd files in the sparsetools folder that are the source of this problem. I have the same problem in both 0.7.1 and 0.8.0 builds of scipy. I am using python 2.6 on a Windows 7 - 64 bit system.</p>