##// END OF EJS Templates
add IPython.config.get_config...
Min RK -
Show More
@@ -1,17 +1,7 b''
1 # encoding: utf-8
1 # encoding: utf-8
2
2
3 __docformat__ = "restructuredtext en"
3 # Copyright (c) IPython Development Team.
4
4 # Distributed under the terms of the Modified BSD License.
5 #-------------------------------------------------------------------------------
6 # Copyright (C) 2008 The IPython Development Team
7 #
8 # Distributed under the terms of the BSD License. The full license is in
9 # the file COPYING, distributed as part of this software.
10 #-------------------------------------------------------------------------------
11
12 #-------------------------------------------------------------------------------
13 # Imports
14 #-------------------------------------------------------------------------------
15
5
16 from .application import *
6 from .application import *
17 from .configurable import *
7 from .configurable import *
@@ -609,3 +609,13 b" def boolean_flag(name, configurable, set_help='', unset_help=''):"
609 unsetter = {cls : {trait : False}}
609 unsetter = {cls : {trait : False}}
610 return {name : (setter, set_help), 'no-'+name : (unsetter, unset_help)}
610 return {name : (setter, set_help), 'no-'+name : (unsetter, unset_help)}
611
611
612
613 def get_config():
614 """Get the config object for the global Application instance, if there is one
615
616 otherwise return an empty config object
617 """
618 if Application.initialized():
619 return Application.instance().config
620 else:
621 return Config()
General Comments 0
You need to be logged in to leave comments. Login now