Corrected sep string handling for Print and Multiline.print
This commit is contained in:
parent
807cd4e8f2
commit
f220d749de
|
@ -11435,8 +11435,12 @@ class _DebugWin():
|
||||||
# print(f'Printing {ObjToStringSingleObj(self.output_element)}')
|
# print(f'Printing {ObjToStringSingleObj(self.output_element)}')
|
||||||
if self.do_not_reroute_stdout:
|
if self.do_not_reroute_stdout:
|
||||||
outstring = ''
|
outstring = ''
|
||||||
for arg in args:
|
num_args = len(args)
|
||||||
outstring += str(arg) + sepchar
|
sep_str = str(sep) if sep is not None else ' '
|
||||||
|
for i, arg in enumerate(args):
|
||||||
|
outstring += str(arg)
|
||||||
|
if i != num_args - 1:
|
||||||
|
outstring += str(sep_str)
|
||||||
outstring += endchar
|
outstring += endchar
|
||||||
self.output_element.Update(outstring, append=True, text_color_for_value=text_color, background_color_for_value=background_color)
|
self.output_element.Update(outstring, append=True, text_color_for_value=text_color, background_color_for_value=background_color)
|
||||||
else:
|
else:
|
||||||
|
@ -11534,8 +11538,13 @@ def _print_to_element(multiline_element, *args, end=None, sep=None, text_color=N
|
||||||
endchar = end if end is not None else '\n'
|
endchar = end if end is not None else '\n'
|
||||||
|
|
||||||
outstring = ''
|
outstring = ''
|
||||||
for arg in args:
|
num_args = len(args)
|
||||||
outstring += str(arg) + sepchar
|
sep_str = str(sep) if sep is not None else ' '
|
||||||
|
for i, arg in enumerate(args):
|
||||||
|
outstring += str(arg)
|
||||||
|
if i != num_args-1:
|
||||||
|
outstring += str(sep_str)
|
||||||
|
|
||||||
outstring += endchar
|
outstring += endchar
|
||||||
multiline_element.update(outstring, append=True, text_color_for_value=text_color, background_color_for_value=background_color)
|
multiline_element.update(outstring, append=True, text_color_for_value=text_color, background_color_for_value=background_color)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue