title: pylab not loading in emacs using ipython
body: <p>I am using Emacs 24.3 in Windows 8. Using PowerShell, <code>ipython</code> loads <code>pylab</code> without issue:</p>
  
  <pre><code>PS C:\Users\vince.forgetta&gt; ipython --pylab
  Python 3.4.0 (v3.4.0:04f714765c13, Mar 16 2014, 19:25:23) [MSC v.1600 64 bit (AMD64)]
  Type "copyright", "credits" or "license" for more information.
  
  IPython 2.2.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.
  Using matplotlib backend: TkAgg
  
  In [1]: linspace
  Out[1]: &lt;function numpy.core.function_base.linspace&gt;
  
  In [2]: plot
  Out[2]: &lt;function matplotlib.pyplot.plot&gt;
  </code></pre>
  
  <p>However, using Emacs 24.3 I get the following error:</p>
  
  <pre><code>Python 3.4.0 (v3.4.0:04f714765c13, Mar 16 2014, 19:25:23) [MSC v.1600 64 bit (AMD64)]
  Type "copyright", "credits" or "license" for more information.
  
  IPython 2.2.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.
  
  In [1]: 
  In [2]: 
  In [3]: 
  In [4]: linspace
  ---------------------------------------------------------------------------
  NameError                                 Traceback (most recent call last)
  &lt;ipython-input-4-fbab96054277&gt; in &lt;module&gt;()
  ----&gt; 1 linspace
  
  NameError: name 'linspace' is not defined
  
  In [5]: plot
  ---------------------------------------------------------------------------
  NameError                                 Traceback (most recent call last)
  &lt;ipython-input-5-88d627f14d84&gt; in &lt;module&gt;()
  ----&gt; 1 plot
  
  NameError: name 'plot' is not defined
  </code></pre>
  
  <p>Which can be solved by importing pylab:</p>
  
  <pre><code>In [6]: from pylab import *
  
  In [7]: linspace
  Out[7]: &lt;function numpy.core.function_base.linspace&gt;
  </code></pre>
  
  <p>The Python specific code in my <code>.emacs</code> is:</p>
  
  <pre><code>;; Python
  (setenv "PYTHONUNBUFFERED" "x")
  ; python-mode
  (setq py-install-directory "~/.emacs.d/python-mode.el-6.1.3")
  (add-to-list 'load-path py-install-directory)
  (require 'python-mode)
  ; use IPython
  (setq-default py-shell-name "ipython")
  (setq-default py-which-bufname "IPython")
  ;; use the wx backend, for both mayavi and matplotlib
  (setq py-python-command-args
    '("--gui=wx" "--pylab=wx" "--colors=Linux"))
  (setq py-force-py-shell-name-p t)
  ; switch to the interpreter after executing code
  (setq py-shell-switch-buffers-on-execute-p t)
  (setq py-switch-buffers-on-execute-p t)
  ; don't split windows
  (setq py-split-windows-on-execute-p nil)
  ; try to automagically figure out indentation
  (setq py-smart-indentation t)
  </code></pre>
  
  <p>From this it would appear that <code>pylab</code> is being imported when <code>ipython</code> starts using the <code>--pylab</code> option, but clearly this doesn't seem to work as I anticipate, or there is an error somewhere. The buffer <em>Messages</em> does not report any errors.</p>
  
  <p>How do I get <code>pylab</code> to load automatically when starting an <code>ipython</code> buffer?</p>
  
  <p>Thanks.</p>