#NEWLINE# def _get_methods_by_component_type( component_type ) : #NEWLINE# #INDENT# methods_module = __import__ ( METHODS_PATH , fromlist = [ 'methods' ] ) #NEWLINE# methods = getattr ( methods_module , 'methods' , None ) #NEWLINE# if methods : #NEWLINE# #INDENT# methods = getattr ( component_type , component_type , None ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# methods = getattr ( methods_module , component_type , None ) #NEWLINE# #UNINDENT# if ( methods is None ) : #NEWLINE# #INDENT# raise Exception ( ( 'Unregistered component type in weblab/methods.py: %s' % component_type ) ) #NEWLINE# #UNINDENT# return methods