title: Unable to set IPython prompt
body: <p>I'm running ipython with the following:</p>
  
  <pre><code>c:\python27\scripts\ipython
  </code></pre>
  
  <p>I'm trying to restore old Python prompt behaviour (">>>") for some reasons.</p>
  
  <p>I've tried to search internet extensively for that purpose, to no avail.</p>
  
  <p>Then I reached for IPython documentation, which turned out to be confusing and unhelpful.
  According to <a href="http://ipython.readthedocs.io/en/stable/config/details.html" rel="nofollow noreferrer">http://ipython.readthedocs.io/en/stable/config/details.html</a></p>
  
  <p>To set the new prompt, assign it to the prompts attribute of the IPython shell:</p>
  
  <pre><code>In [2]: ip = get_ipython()
  ...: ip.prompts = MyPrompt(ip)
  
  /home/bob &gt;&gt;&gt; # it works
  </code></pre>
  
  <p>I get the exception that get_ipython is undefined:</p>
  
  <pre><code>[TerminalIPythonApp] ERROR | Exception while loading config file C:\Users\xxx\.ipython\profile_default\ipython_config.py
  Traceback (most recent call last):
  File "c:\python27\lib\site-packages\traitlets\config\application.py", line 562, in _load_config_files
      config = loader.load_config()
    File "c:\python27\lib\site-packages\traitlets\config\loader.py", line 457, in load_config
      self._read_file_as_dict()
    File "c:\python27\lib\site-packages\traitlets\config\loader.py", line 489, in _read_file_as_dict
      py3compat.execfile(conf_filename, namespace)
    File "c:\python27\lib\site-packages\ipython_genutils\py3compat.py", line 278, in execfile
      exec(compiler(scripttext, filename, 'exec'), glob, loc)
    File "C:\Users\rgomulk\.ipython\profile_default\ipython_config.py", line 9, in &lt;module&gt;
      ip = get_ipython()
  NameError: name 'get_ipython' is not defined
  Python 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit (Intel)]
  Type "copyright", "credits" or "license" for more information.
  
  IPython 5.1.0 -- An enhanced Interactive Python.
  ?         -&gt; Introduction and overview of IPython's features.
  %quickref -&gt; Quick reference.
  help      -&gt; Python's own help system.
  object?   -&gt; Details about 'object', use 'object??' for extra details.
  </code></pre>
  
  <p>(With the following complete code in my ipython_config.py:</p>
  
  <pre><code>from IPython.terminal.prompts import Prompts, Token
  
  class MyPrompt(Prompts):
      def in_prompt_tokens(self, cli=None):
          return [(Token.Prompt, ' &gt;&gt;&gt;')]
  
  ip = get_ipython()
  ip.prompts = MyPrompt(ip)
  </code></pre>
  
  <p>After next round of googling I've added the following line to the config:</p>
  
  <pre><code>from IPython import get_ipython
  </code></pre>
  
  <p>This time the result was different:</p>
  
  <pre><code>[TerminalIPythonApp] ERROR | Exception while loading config file C:\Users\xxx\.ipython\profile_default\ipython_config.py
  Traceback (most recent call last):
    File "c:\python27\lib\site-packages\traitlets\config\application.py", line 562, in _load_config_files
      config = loader.load_config()
    File "c:\python27\lib\site-packages\traitlets\config\loader.py", line 457, in load_config
      self._read_file_as_dict()
    File "c:\python27\lib\site-packages\traitlets\config\loader.py", line 489, in _read_file_as_dict
      py3compat.execfile(conf_filename, namespace)
    File "c:\python27\lib\site-packages\ipython_genutils\py3compat.py", line 278, in execfile
      exec(compiler(scripttext, filename, 'exec'), glob, loc)
    File "C:\Users\rgomulk\.ipython\profile_default\ipython_config.py", line 11, in &lt;module&gt;
      ip.prompts = MyPrompt(ip)
  AttributeError: 'NoneType' object has no attribute 'prompts'
  </code></pre>
  
  <p>So the question is twofold:
  1. How can I actually set the prompt/restore old prompt behaviour?
  2. Why doesn't the code from IPython documentation work? Is that a bug in implementation or documentation?</p>
  
  <p>IPython version and other versions already given in IPython output.</p>
  
  <p>Regards,
  Robert</p>