def console(msg, newline=True): """Writes the message to the console. If the ``newline`` argument is ``True``, a newline character is automatically added to the message. """ librarylogger.console(msg, newline)
def console(msg, newline=True, stream='stdout'): """Writes the message to the console. If the ``newline`` argument is ``True``, a newline character is automatically added to the message. By default the message is written to the standard output stream. Using the standard error stream is possibly by giving the ``stream`` argument value ``'stderr'``. This is a new feature in RF 2.8.2. """ librarylogger.console(msg, newline, stream)
def split_take_slice(value, separator, _from=None, to=None): librarylogger.console(value) librarylogger.console(separator) librarylogger.console(_from) librarylogger.console(to) l = value.split(separator) if to: l = l[:int(to)] if _from: l = l[int(_from):] return l
def start_assistant(self): log.console('\nHello, how may i help you today?\n') while True: keyword = raw_input().strip() if keyword == '': continue if keyword == 'bye': break if keyword.lower() == 'start assistant': log.console('Already running') continue try: ret = BuiltIn().run_keyword(*keyword.split(' ')) log.console(ret) except Exception as e: log.console(e)
def join(l, separator): librarylogger.console('join') librarylogger.console(l) return separator.join(l)
def split_take_slice_to(value, separator, to): librarylogger.console('split_take_slice_to') return split_take_slice(value, separator, to=to)
def split_take_slice_from(value, separator, _from): librarylogger.console('split_take_slice_from') return split_take_slice(value, separator, _from)
def split_take_item(value, separator, index): librarylogger.console('split_take_item') librarylogger.console(value) librarylogger.console(separator) librarylogger.console(index) return value.split(separator)[int(index)]
def console(msg,newline=True): librarylogger.console(msg,newline)