How to use the honcho.printer.Message function in honcho

To help you get started, we’ve selected a few honcho examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nickstenning / honcho / tests / test_manager.py View on Github external
def send_manager(self, process_name, type, data, **kwargs):
        self.manager.events.put(Message(type=type,
                                        data=data,
                                        time=datetime.datetime.now(),
                                        name=process_name,
                                        colour=None))
github nickstenning / honcho / tests / test_printer.py View on Github external
def fake_message(data, **kwargs):
    defaults = {
        'type': 'line',
        'data': data,
        'time': datetime.datetime(2012, 8, 11, 12, 42),
        'name': None,
        'colour': None,
    }
    defaults.update(kwargs)
    return Message(**defaults)
github nickstenning / honcho / honcho / manager.py View on Github external
def _system_print(self, data):
        self._printer.write(Message(type='line',
                                    data=data,
                                    time=self._env.now(),
                                    name=SYSTEM_PRINTER_NAME,
                                    colour=None))
github nickstenning / honcho / honcho / process.py View on Github external
def _send_message(self, data, type='line'):
        if self._events is not None:
            self._events.put(Message(type=type,
                                     data=data,
                                     time=self._env.now(),
                                     name=self.name,
                                     colour=self.colour))