#NEWLINE# @ staticmethod #NEWLINE# def behaviors( ) : #NEWLINE# #INDENT# if ( Behavior . _behaviors is None ) : #NEWLINE# #INDENT# behaviors_yaml = os . path . sep . join ( ( __file__ . split ( os . path . sep ) [ : ( - 1 ) ] + [ 'behaviors.yaml' ] ) ) #NEWLINE# with open ( behaviors_yaml ) as fin : #NEWLINE# #INDENT# conf = yaml . load ( fin ) #NEWLINE# #UNINDENT# Behavior . _behaviors = conf [ 'behaviors' ] #NEWLINE# for behavior in Behavior . _behaviors : #NEWLINE# #INDENT# if ( 'behavior_js' in behavior ) : #NEWLINE# #INDENT# behavior_js = os . path . sep . join ( ( ( __file__ . split ( os . path . sep ) [ : ( - 1 ) ] + [ 'behaviors.d' ] ) + [ behavior [ 'behavior_js' ] ] ) ) #NEWLINE# with open ( behavior_js , encoding = 'utf-8' ) as fin : #NEWLINE# #INDENT# behavior [ 'script' ] = fin . read ( ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( 'behavior_js_template' in behavior ) : #NEWLINE# #INDENT# behavior_js_template = os . path . sep . join ( ( ( __file__ . split ( os . path . sep ) [ : ( - 1 ) ] + [ 'behaviors.d' ] ) + [ behavior [ 'behavior_js_template' ] ] ) ) #NEWLINE# with open ( behavior_js_template , encoding = 'utf-8' ) as fin : #NEWLINE# #INDENT# behavior [ 'template' ] = string . Template ( fin . read ( ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# return Behavior . _behaviors