#NEWLINE# def get_state( name , parse = True ) : #NEWLINE# #INDENT# path = os . path . normpath ( os . path . join ( os . path . dirname ( __file__ ) , 'data' , name ) ) #NEWLINE# with open ( path , 'rb' ) as fobj : #NEWLINE# #INDENT# val = fobj . read ( ) #NEWLINE# if parse : #NEWLINE# #INDENT# return json . loads ( val ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return val