pympi/Praat.py
def add_interval(self, begin, end, value, check=True):
        """Add an interval to the IntervalTier.

        :param float begin: Start time of the interval.
        :param float end: End time of the interval.
        :param str value: Text of the interval.
        :param bool check: Flag to check for overlap.
        :raises Exception: If overlap, begin > end or wrong tiertype.
        """
        if self.tier_type != 'IntervalTier':
            raise Exception('Tiertype must be IntervalTier')
        if check:
            if any(i for i in self.intervals if begin < i[1] and end > i[0]):
                raise Exception('No overlap is allowed')
            if begin > end:
                raise Exception('Begin must be smaller then end')
        self.intervals.append((begin, end, value))
def add_interval(self, begin, end, value, check=True):
        if self.tier_type != 'IntervalTier':
            raise Exception('Tiertype must be IntervalTier')
        if check:
            if any(i for i in self.intervals if begin < i[1] and end > i[0]):
                raise Exception('No overlap is allowed')
            if begin > end:
                raise Exception('Begin must be smaller then end')
        self.intervals.append((begin, end, value))
def add_interval ( self , begin , end , value , check = True ) : if self . tier_type != 'IntervalTier' : raise Exception ( 'Tiertype must be IntervalTier' ) if check : if any ( i for i in self . intervals if begin < i [ 1 ] and end > i [ 0 ] ) : raise Exception ( 'No overlap is allowed' ) if begin > end : raise Exception ( 'Begin must be smaller then end' ) self . intervals . append ( ( begin , end , value ) )
Add an interval to the IntervalTier.

        :param float begin: Start time of the interval.
        :param float end: End time of the interval.
        :param str value: Text of the interval.
        :param bool check: Flag to check for overlap.
        :raises Exception: If overlap, begin > end or wrong tiertype.
Add an interval to the IntervalTier .