You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

SciTE输出面板中Python脚本print()输出变红:特性还是Bug?

Is This SciTE Output Coloring Behavior Normal?

Hey there! Let me confirm first: this behavior is totally normal for your version of SciTE, and it's tied to how the editor's output panel handles syntax highlighting for common error/traceback patterns.

Why the Color Change Happens

SciTE's output panel has built-in rules to automatically highlight lines that look like code error messages—think Python tracebacks that include line to indicate where an issue occurred.

Your SciTE 3.6.0 (compiled for GTK+ 3.16.7 in 2015) uses default configuration rules that target lines containing the word line in specific contexts. Here's how it applies to your script:

  • print(" at data line "): The phrase follows the pattern [some text] line , which matches SciTE's rule for marking potential error lines, so it gets colored red.
  • print(" at line "): Without any characters between at and line, the pattern doesn't trigger the error-line highlight rule, so it uses the default black text.
  • print(" at . line "): Similar to the first case, the extra character (.) between at and line makes it fit the [text] line pattern, triggering the red highlight again.

Under the hood, this is controlled by properties in SciTE's configuration files (like SciTEGlobal.properties). For example, rules like output.error.line define regex patterns to match lines that should be colored red, and your output lines are hitting those regex matches.

This was intentional design in older SciTE versions—its output panel tries to make it easier to spot error lines by highlighting them, even if they're not actual tracebacks.

内容的提问来源于stack exchange,提问作者user7711283

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.01 02:43:16