From 6f4d36ca8f839e7344e0bf978565650d41e7c9c0 Mon Sep 17 00:00:00 2001 From: PiloeGAO Date: Wed, 1 Mar 2023 11:01:41 +1100 Subject: [PATCH] Python: Change console banner color-style to info Update the style of the Python Console banner to "INFO" instead of "OUTPUT". This change makes it easier to difference user generated output from the initial banner text. This also has an advantage that "Copy as Script" excludes the banner. Ref !105188. --- scripts/modules/console_python.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/modules/console_python.py b/scripts/modules/console_python.py index a0feceabb3d..cb665b85fac 100644 --- a/scripts/modules/console_python.py +++ b/scripts/modules/console_python.py @@ -329,8 +329,11 @@ def banner(context): "", ) + # NOTE: Using `OUTPUT` style (intended for the `stdout` is also valid). + # Using `INFO` has a slight advantage that it's excluded by the "Copy as Script" operator. + # As the banner isn't useful to include in a script - leave it out. for line in message: - add_scrollback(line, 'OUTPUT') + add_scrollback(line, 'INFO') sc.prompt = PROMPT