#NEWLINE# def serialize_to_file( file_or_path , theme ) : #NEWLINE# #INDENT# if ( isinstance ( file_or_path , str ) or isinstance ( file_or_path , unicode ) ) : #NEWLINE# #INDENT# with open ( file_or_path , 'wt' ) as f : #NEWLINE# #INDENT# f . write ( '\n' . join ( serialize_to_lines ( f ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# file_or_path . write ( '\n' . join ( serialize_to_lines ( theme ) ) )