Skip to content
Snippets Groups Projects
Commit 4569df02 authored by Todd Gamblin's avatar Todd Gamblin Committed by GitHub
Browse files

Merge pull request #1060 from mathstuf/no-break-long-words

tty: do not break long words
parents 9a8d1096 36decbfa
Branches
Tags
No related merge requests found
...@@ -64,12 +64,14 @@ def info(message, *args, **kwargs): ...@@ -64,12 +64,14 @@ def info(message, *args, **kwargs):
format = kwargs.get('format', '*b') format = kwargs.get('format', '*b')
stream = kwargs.get('stream', sys.stdout) stream = kwargs.get('stream', sys.stdout)
wrap = kwargs.get('wrap', False) wrap = kwargs.get('wrap', False)
break_long_words = kwargs.get('break_long_words', False)
cprint("@%s{==>} %s" % (format, cescape(str(message))), stream=stream) cprint("@%s{==>} %s" % (format, cescape(str(message))), stream=stream)
for arg in args: for arg in args:
if wrap: if wrap:
lines = textwrap.wrap( lines = textwrap.wrap(
str(arg), initial_indent=indent, subsequent_indent=indent) str(arg), initial_indent=indent, subsequent_indent=indent,
break_long_words=break_long_words)
for line in lines: for line in lines:
stream.write(line + '\n') stream.write(line + '\n')
else: else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment