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.
This commit is contained in:
PiloeGAO 2023-03-01 11:01:41 +11:00 committed by Campbell Barton
parent 6fe2fabbff
commit 6f4d36ca8f
1 changed files with 4 additions and 1 deletions

View File

@ -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