title: "Name Error: name 'get_ipython' is not defined" while preparing a debugging session via "import ipdb"
body: <p>I'm trying to install and use ipdb (IPython-enabled pdb) on Python 3.3.5 32 bit on Win10 using PIP 8.1.2.
  I've installed via PIP (had to install it seprately) in windows cmd with no errors:</p>
  
  <pre><code> pip install ipdb
  </code></pre>
  
  <p>I wrote a simple test script expecting to stop in debugger before printing 'test' string, <em>ipdb_test.py</em>:</p>
  
  <pre><code>import ipdb
  ipdb.set_trace()
  print('test')
  </code></pre>
  
  <p>When running it from IDLE editor the following exceptions show up:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\Python33.5-32\lib\site-packages\ipdb\__main__.py", line 44, in &lt;module&gt;
      get_ipython
  NameError: name 'get_ipython' is not defined
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "C:/temp/ipdb_test.py", line 1, in &lt;module&gt;
      import ipdb
    File "C:\Python33.5-32\lib\site-packages\ipdb\__init__.py", line 7, in &lt;module&gt;
      from ipdb.__main__ import set_trace, post_mortem, pm, run             # noqa
    File "C:\Python33.5-32\lib\site-packages\ipdb\__main__.py", line 51, in &lt;module&gt;
  
    (...)
  
    File "C:\Python33.5-32\lib\site-packages\prompt_toolkit\terminal\win32_output.py", line 266, in flush
      self.stdout.flush()
  AttributeError: 'NoneType' object has no attribute 'flush'
  </code></pre>