def default(self, arg):
        try:
            token = arg.strip()
            if not token:
                return False
            comment = [token.startswith(x) for x in self.comment]
            if reduce(lambda x,y: x or y, comment):
                return False
            if token[0] == '\\':
                token = token[1:]
            # is it possible the line contains the delimiter
            if len(token) >= len(self.delimiter):
                # does the line end with the delimiter
                if token[-1 * len(self.delimiter):] == self.delimiter:
                    # now add all up to the delimiter
                    self.sqlbuffer.append(token[:-1 * len(self.delimiter)])
                    if self.sqlbuffer:
                        q = " ".join(self.sqlbuffer)
                        print q
                        self.db.isql(q, **self.kw)
                        self.sqlbuffer = []
                        if self.db.updatecount:
                            print
                            if self.db.updatecount == 1:
                                print "1 row affected"
                            else:
                                print "%d rows affected" % (self.db.updatecount)
                            print
                        return False
            if token:
                self.sqlbuffer.append(token)
        except:
            self.sqlbuffer = []
            print
            print sys.exc_info()[1]
            print
        return False
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/isql.py/IsqlCmd.default/original