<div class="gmail_extra"><div class="gmail_quote">Hi Pavol,<br><br>On 14 December 2012 22:38, Pavol Juhas <span dir="ltr">&lt;<a href="mailto:pavol.juhas@gmail.com" target="_blank">pavol.juhas@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div id=":1ob"># ------------------------------------------------------------------------<br>
from IPython.frontend.terminal.ipapp import TerminalIPythonApp<br>
app = TerminalIPythonApp.instance()<br>
app.config.TerminalIPythonApp.pylab = &#39;auto&#39;<br>
app.config.TerminalIPythonApp.pylab_import_all = True<br>
app.initialize(argv=[])<br>
app.shell.mainloop()<br>
# ------------------------------------------------------------------------<br>
<br>
<br>
If this code snippet is run with a non-existing IPYTHONDIR the<br>
pylab environment is not imported:<br>
<br>
mkdir /tmp/idir<br>
export IPYTHONDIR=/tmp/idir<br>
python launchpylab.py<br>
...<br>
In [1]: plot<br>
---------------------------------------------------------------------------<br>
NameError                                 Traceback (most recent call last)</div></blockquote></div><br>I&#39;ve replicated that, and I think you have spotted a bug - the action of those config changes shouldn&#39;t depend on whether the config file exists. Please do file an issue on Github so that we don&#39;t forget about it.<br>

<br>However, this is the recommended way to do configuration, and it does work even with a fresh $IPYTHONDIR:<br><br># -----------------------------------------------------------------------------------------<br>from IPython.frontend.terminal.ipapp import TerminalIPythonApp<br>

from IPython.config import Config<br>c = Config()<br>c.TerminalIPythonApp.pylab = &#39;auto&#39;<br>c.TerminalIPythonApp.pylab_import_all = True<br><br>app = TerminalIPythonApp.instance(config=c)<br>app.initialize(argv=[])<br>

app.shell.mainloop()<br># -----------------------------------------------------------------------------------------<br><br>Best wishes,<br>Thomas<br></div>