<s> import sublime ; <EOL> class Settings ( object ) : <EOL> @ staticmethod <EOL> def get ( path , default = None ) : <EOL> result = default ; <EOL> if sublime . active_window ( ) . active_view ( ) . settings ( ) . get ( '<STR_LIT>' ) : <EOL> result = Settings . getFrom ( sublime . active_window ( ) . active_view ( ) . settings ( ) . get ( '<STR_LIT>' ) , path , default ) ; <EOL> if result == default : <EOL> result = Settings . getFrom ( sublime . load_settings ( '<STR_LIT>' ) , path , default ) ; <EOL> return result ; <EOL> @ staticmethod <EOL> def getFrom ( settings , path , default = None ) : <EOL> parts = path . split ( '<STR_LIT:.>' ) ; <EOL> for part in parts : <EOL> if not settings or not hasattr ( settings , '<STR_LIT>' ) : <EOL> return settings ; <EOL> else : <EOL> settings = settings . get ( part , default ) ; <EOL> return settings ; </s>
