#NEWLINE# def _restore_window_layout( self , window ) : #NEWLINE# #INDENT# ' Restore the window layout. ' #NEWLINE# filename = os . path . join ( memento . state_location , 'window_memento' ) #NEWLINE# if os . path . exists ( filename ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# f = open ( filename , 'rb' ) #NEWLINE# memento = cPickle . load ( f ) #NEWLINE# f . close ( ) #NEWLINE# window . set_memento ( memento ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# logger . exception ( 'restoring window layout from %s' , filename ) #NEWLINE# #UNINDENT# #UNINDENT# return