##// END OF EJS Templates
move useful update_config method to Configurable from Application...
MinRK -
Show More
@@ -138,6 +138,16 b' class Configurable(HasTraits):'
138 # shared by all instances, effectively making it a class attribute.
138 # shared by all instances, effectively making it a class attribute.
139 setattr(self, k, deepcopy(config_value))
139 setattr(self, k, deepcopy(config_value))
140
140
141 def update_config(self, config):
142 """Fire the traits events when the config is updated."""
143 # Save a copy of the current config.
144 newconfig = deepcopy(self.config)
145 # Merge the new config into the current one.
146 newconfig._merge(config)
147 # Save the combined config as self.config, which triggers the traits
148 # events.
149 self.config = newconfig
150
141 @classmethod
151 @classmethod
142 def class_get_help(cls):
152 def class_get_help(cls):
143 """Get the help string for this class in ReST format."""
153 """Get the help string for this class in ReST format."""
General Comments 0
You need to be logged in to leave comments. Login now