Я установил пакет SublimeANSI , отредактировал оба файла Makefile
и Python
sublime-build, используя PackageResourceViewer
.
Makefile:
{
"shell_cmd": "make",
"file_regex": "^(..[^:\n]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${folder:${project_path:${file_path}}}",
"selector": "source.makefile",
"syntax": "Packages/Makefile/Make Output.sublime-syntax",
"keyfiles": ["Makefile", "makefile"],
/* add target and syntax */
"target": "ansi_color_build",
"syntax": "Packages/ANSIescape/ANSI.tmLanguage",
"variants":
[
{
"name": "Clean",
"shell_cmd": "make clean"
}
]
}
Python:
{
"shell_cmd": "python -u \"$file\"",
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python",
"env": {"PYTHONIOENCODING": "utf-8"},
/* add target and syntax */
"target": "ansi_color_build",
"syntax": "Packages/ANSIescape/ANSI.tmLanguage",
"variants":
[
{
"name": "Syntax Check",
"shell_cmd": "python -m py_compile \"${file}\"",
}
]
}
Но по какой-то причине вывод все еще не может декодировать ANSI:
* Serving Flask app "app" (lazy loading)
* Environment: production
WARNING: Do not use the development server in a production environment.
Use a production WSGI server instead.
* Debug mode: on
* Restarting with stat
* Debugger is active!
* Debugger PIN: 782-294-512
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
127.0.0.1 - - [16/Feb/2019 11:15:07] "[37mGET / HTTP/1.1[0m" 200 -