diff --git a/IPython/frontend/terminal/ipapp.py b/IPython/frontend/terminal/ipapp.py index 3b6e3ff..472b58e 100755 --- a/IPython/frontend/terminal/ipapp.py +++ b/IPython/frontend/terminal/ipapp.py @@ -37,7 +37,7 @@ from IPython.config.loader import ( PyFileConfigLoader ) from IPython.lib import inputhook -from IPython.utils.path import filefind, get_ipython_dir +from IPython.utils.path import filefind, get_ipython_dir, check_for_old_config from IPython.core import usage #----------------------------------------------------------------------------- @@ -635,6 +635,7 @@ class IPythonApp(Application): self.shell.showtraceback() def start_app(self): + check_for_old_config(self.ipython_dir) if self.master_config.Global.interact: self.log.debug("Starting IPython's mainloop...") self.shell.mainloop() diff --git a/IPython/utils/path.py b/IPython/utils/path.py index ddae611..c046e8c 100644 --- a/IPython/utils/path.py +++ b/IPython/utils/path.py @@ -18,6 +18,7 @@ import os import sys import IPython +from IPython.utils import warn from IPython.utils.process import system from IPython.utils.importstring import import_item @@ -399,3 +400,22 @@ def target_update(target,deps,cmd): if target_outdated(target,deps): system(cmd) +def check_for_old_config(ipython_dir=None): + """Check for old config files, and present a warning if they exist. + + A link to the docs of the new config is included in the message. + + This should mitigate confusion with the transition to the new + config system in 0.11. + """ + if ipython_dir is None: + ipython_dir = get_ipython_dir() + + old_configs = ['ipy_user_conf.py', 'ipythonrc'] + for cfg in old_configs: + f = os.path.join(ipython_dir, cfg) + if os.path.exists(f): + warn.warn("""Found old IPython config file %r. + The IPython configuration system has changed as of 0.11, and this file will be ignored. + See http://ipython.github.com/ipython-doc/dev/config for details on the new config system. + The current default config file is 'ipython_config.py'"""%f)