def _restore_window_layout(self, window):

        filename = os.path.join(self.state_location, 'window_memento')
        if os.path.exists(filename):
            try:
                # If the memento class itself has been modified then there
                # is a chance that the unpickle will fail. If so then we just
                # carry on as if there was no memento!
                f = open(filename, 'rb')
                memento = cPickle.load(f)
                f.close()

                # The memento doesn't actually get used until the window is
                # opened, so there is nothing to go wrong in this step!
                window.set_memento(memento)

            # If *anything* goes wrong then simply log the error and carry on
            # with no memento!
            except:
                logger.exception('restoring window layout from %s', filename)

        return
Returns underlying file descriptor if one exists.
dataset/ETHPy150Open enthought/pyface/pyface/workbench/workbench.py/Workbench._restore_window_layout--crossover with--dataset/ETHPy150Open PyTables/PyTables/tables/nodes/filenode.py/RawPyTablesIO.fileno