def process(self):
        """ Begin processing a given stream

        Example:

        obj = Slurp(open('/etc/fstab', 'r'))
        obj.register('^#.*$', print)
        obj.process()

        """
        # CAVEAT: The IO object *MUST* have a .readline() interface. This isn't much
        # of a showstopper as it's common, but a simple workaround would be to impliment
        # my own readline method (scanning for \n would work reasonably well) here inside
        # of Slurp to fall back on. I haven't hit a need for that yet, but this should
        # serve to remind me about it, if it ever comes up.
        buff = self.ioObj.readline()
        while buff:
            for pair in self.triggers:
                tmp_re = re.compile(pair[0])
                if tmp_re.match(buff):
                    # Call the callback with the line of text as the only argument
                    pair[1](buff.strip())
                    # Now lets see if we are a final measure
                    if pair[2] == False:
                        break
            # And refill the well.
            buff = self.ioObj.readline()
 Begin processing a given stream

        Example:

        obj = Slurp(open('/etc/fstab', 'r'))
        obj.register('^#.*$', print)
        obj.process()

        
recipes/Python/578532_slurppy_Regex_based_simple_parsing/recipe-578532.py