diff --git a/IPython/config/__init__.py b/IPython/config/__init__.py index c7f2b59..0ae7d63 100644 --- a/IPython/config/__init__.py +++ b/IPython/config/__init__.py @@ -1,17 +1,7 @@ # encoding: utf-8 -__docformat__ = "restructuredtext en" - -#------------------------------------------------------------------------------- -# Copyright (C) 2008 The IPython Development Team -# -# Distributed under the terms of the BSD License. The full license is in -# the file COPYING, distributed as part of this software. -#------------------------------------------------------------------------------- - -#------------------------------------------------------------------------------- -# Imports -#------------------------------------------------------------------------------- +# Copyright (c) IPython Development Team. +# Distributed under the terms of the Modified BSD License. from .application import * from .configurable import * diff --git a/IPython/config/application.py b/IPython/config/application.py index 69a317f..ef97162 100644 --- a/IPython/config/application.py +++ b/IPython/config/application.py @@ -609,3 +609,13 @@ def boolean_flag(name, configurable, set_help='', unset_help=''): unsetter = {cls : {trait : False}} return {name : (setter, set_help), 'no-'+name : (unsetter, unset_help)} + +def get_config(): + """Get the config object for the global Application instance, if there is one + + otherwise return an empty config object + """ + if Application.initialized(): + return Application.instance().config + else: + return Config()