title: Python: Why is IDLE so slow?
body: <p><a href="http://en.wikipedia.org/wiki/IDLE_(Python)" rel="noreferrer">IDLE</a> is my favorite Python editor. It offers very nice and intuitive Python shell which is extremely useful for unit-testing and debugging, and a neat debugger.</p>
  <p><strong>However, code executed under IDLE is insanely slow. By insanely I mean <em>3 orders of magnitude</em> slow:</strong></p>
  <h3>bash</h3>
  <pre><code>time echo &quot;for i in range(10000): print 'x',&quot; | python
  </code></pre>
  <p>Takes 0.052s,</p>
  <h3>IDLE</h3>
  <pre><code>import datetime
  start=datetime.datetime.now()
  for i in range(10000): print 'x',
  end=datetime.datetime.now()
  print end-start
  </code></pre>
  <p>Takes:</p>
  <pre><code>&gt;&gt;&gt; 0:01:44.853951
  </code></pre>
  <p>Which is roughly 2,000 times slower.</p>
  <p>Any thoughts, or ideas how to improve this? I guess it has something to do with the debugger in the background, but I'm not really sure.</p>
  <p>Adam</p>