def checkMaxSessions(self, nMax=None):
        """
        check whether max. number of saved sessions is reached
        if: remove the oldest session
        """
        if nMax is None:
            nMax = self.opts['maxSessions']
        l = self.stateNames()
        if len(l) > nMax:
            for f in l[:len(l) - nMax]:
                self.tmp_dir_session.remove(str(f))
def checkMaxSessions ( self , nMax = None ) : if nMax is None : nMax = self . opts [ 'maxSessions' ] l = self . stateNames ( ) if len ( l ) > nMax : for f in l [ : len ( l ) - nMax ] : self . tmp_dir_session . remove ( str ( f ) )
check whether max. number of saved sessions is reached
        if: remove the oldest session