pympi/Elan.py
def generate_ts_id(self, time=None):
        """Generate the next timeslot id, this function is mainly used
        internally

        :param int time: Initial time to assign to the timeslot.
        :raises ValueError: If the time is negative.
        """
        if time and time < 0:
            raise ValueError('Time is negative...')
        if not self.maxts:
            valid_ts = [int(''.join(filter(str.isdigit, a)))
                        for a in self.timeslots]
            self.maxts = max(valid_ts + [1])+1
        else:
            self.maxts += 1
        ts = 'ts{:d}'.format(self.maxts)
        self.timeslots[ts] = time
        return ts
def generate_ts_id(self, time=None):
        if time and time < 0:
            raise ValueError('Time is negative...')
        if not self.maxts:
            valid_ts = [int(''.join(filter(str.isdigit, a)))
                        for a in self.timeslots]
            self.maxts = max(valid_ts + [1])+1
        else:
            self.maxts += 1
        ts = 'ts{:d}'.format(self.maxts)
        self.timeslots[ts] = time
        return ts
def generate_ts_id ( self , time = None ) : if time and time < 0 : raise ValueError ( 'Time is negative...' ) if not self . maxts : valid_ts = [ int ( '' . join ( filter ( str . isdigit , a ) ) ) for a in self . timeslots ] self . maxts = max ( valid_ts + [ 1 ] ) + 1 else : self . maxts += 1 ts = 'ts{:d}' . format ( self . maxts ) self . timeslots [ ts ] = time return ts
Generate the next timeslot id, this function is mainly used
        internally

        :param int time: Initial time to assign to the timeslot.
        :raises ValueError: If the time is negative.
Generate the next timeslot id this function is mainly used internally