#NEWLINE# def write_msgpack( filename , d ) : #NEWLINE# #INDENT# with open ( ( filename + '.tmp' ) , 'wb' ) as fd : #NEWLINE# #INDENT# msgpack . pack ( d , fd ) #NEWLINE# fd . flush ( ) #NEWLINE# os . fsync ( fd ) #NEWLINE# #UNINDENT# os . rename ( ( filename + '.tmp' ) , filename )