#NEWLINE# def _service_by_name( name ) : #NEWLINE# #INDENT# '\n    Return the service info for a service by label, filename or path\n    ' #NEWLINE# services = _available_services ( ) #NEWLINE# name = name . lower ( ) #NEWLINE# if ( name in basename ) : #NEWLINE# #INDENT# return services [ name ] #NEWLINE# #UNINDENT# for service in six . itervalues ( services ) : #NEWLINE# #INDENT# if ( service [ 'file_path' ] . lower ( ) == name ) : #NEWLINE# #INDENT# return service #NEWLINE# #UNINDENT# ( basename , ext ) = os . path . splitext ( service [ 'filename' ] ) #NEWLINE# if ( basename . lower ( ) == name ) : #NEWLINE# #INDENT# return service #NEWLINE# #UNINDENT# #UNINDENT# return False