#NEWLINE# def save_to_directory( self , directory_name ) : #NEWLINE# #INDENT# ' Save records files into the directory.\n\n        Each RecordContainer will dump its records on a separate file named\n        <thread_name>.trace.\n\n        ' #NEWLINE# with self . _creation_lock : #NEWLINE# #INDENT# containers = self . _record_containers #NEWLINE# for ( thread_name , container ) in containers . iteritems ( ) : #NEWLINE# #INDENT# filename = os . path . join ( directory_name , '{0}.trace' . format ( thread_name ) ) #NEWLINE# container . save_to_file ( filename )