Very Simple Program Crashing Python 3.5 and spyder
<pre><code>xx = 0
n = 4294967295

while xx &lt;= n:
    print("xx = ", xx, bin(xx))
    xx += 1
</code></pre>

<p>This results in the following traceback:</p>

<pre><code>  File "&lt;ipython-input-2-0c9d04ddbbc6&gt;", line 1, in &lt;module&gt;
    runfile('C:/Users/Allen/Documents/Python Scripts/crunchy.py', wdir='C:/Users/Allen/Documents/Python Scripts')

  File "C:\Users\Allen\Anaconda3\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 714, in runfile
    execfile(filename, namespace)

  File "C:\Users\Allen\Anaconda3\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 89, in execfile
    exec(compile(f.read(), filename, 'exec'), namespace)

  File "C:/Users/Allen/Documents/Python Scripts/crunchy.py", line 11, in &lt;module&gt;
    print("xx = ", xx, bin(xx))

  File "C:\Users\Allen\Anaconda3\lib\site-packages\ipykernel\iostream.py", line 317, in write
    self._buffer.write(string)

ValueError: I/O operation on closed file
</code></pre>

<p>It seems that you are using ipython. </p>

<p>According to this page: <a href="https://github.com/ipython/ipython/issues/9168" rel="nofollow">https://github.com/ipython/ipython/issues/9168</a></p>

<p>you might run into a know issue and will be fixed in the next release. By the way, that program does not crash when I am running it in terminal.</p>

python anaconda spyder