Skip to content

TerminalIPythonApp configuration fails without #2693

pavoljuhas opened this Issue Dec 17, 2012 · 2 comments

3 participants


I have a small application that can optionally start IPython shell
using the following code:

from IPython.frontend.terminal.ipapp import TerminalIPythonApp 
app = TerminalIPythonApp.instance() 
app.config.TerminalIPythonApp.pylab = 'auto' 
app.config.TerminalIPythonApp.pylab_import_all = True 

However, the configuration settings for pylab and pylab_import_all are
ignored unless the file exists and it sets some
configuration parameter. I would expect the configuration commands
above to be effective regardless of the existence of

For more details about this issue and for a workaround see

IPython member

As a reminder to anyone else reading this, the correct way to configure an IPython instance is to create a config object first, set values on it, and pass it in when the instance is created. After instantiation, you change values directly on the app and shell objects, not in their config (but that doesn't work for config values which are only checked at startup, like in this example).

But it's still bizarre that the behaviour is affected by the existence of a config file, hence this issue.

IPython member
minrk commented Jul 4, 2013

I'm going to close this, because it's just a misuse / misunderstanding of config.

The reason creating a config file has an effect on this particular code is that loading a config file will load the config from the file file, then reload prior config (which would normally come from the command-line), in order to ensure the right priority. It's that reload for priority that makes this case 'work'.

@minrk minrk closed this Jul 4, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.