def send_messages(self, messages):
        if not messages:
            return
        self._lock.acquire()
        try:
            # The try-except is nested to allow for
            # Python 2.4 support (Refs #12147)
            try:
                stream_created = self.open()
                for message in messages:
                    self.stream.write(render_message(message))
                    self.stream.write('\n')
                    self.stream.write('-'*79)
                    self.stream.write('\n')
                    self.stream.flush()  # flush after each message
                if stream_created:
                    self.close()
            except:
                if not self.fail_silently:
                    raise
        finally:
            self._lock.release()
        return len(messages)
Return list of children of given route, for generating index in Web Page
dataset/ETHPy150Open stefanfoulis/django-sendsms/sendsms/backends/console.py/SmsBackend.send_messages--crossover with--dataset/ETHPy150Open frappe/frappe/frappe/website/website_generator.py/WebsiteGenerator.get_children_of