Feature or enhancement
Proposal:
We can use the existing syntax theme to add colour to the output of:
pprint.pp(data)pprint.pprint(data)pprint.PrettyPrinter().pprint(data)
| classSyntax(ThemeSection): |
| prompt: str=ANSIColors.BOLD_MAGENTA |
| keyword: str=ANSIColors.BOLD_BLUE |
| keyword_constant: str=ANSIColors.BOLD_BLUE |
| builtin: str=ANSIColors.CYAN |
| comment: str=ANSIColors.RED |
| string: str=ANSIColors.GREEN |
| number: str=ANSIColors.YELLOW |
| op: str=ANSIColors.RESET |
| definition: str=ANSIColors.BOLD |
| soft_keyword: str=ANSIColors.BOLD_BLUE |
| reset: str=ANSIColors.RESET |
As usual, this will respect the environment variables to control colour and the output stream's capabilities.
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response
Linked PRs
Feature or enhancement
Proposal:
We can use the existing
syntaxtheme to add colour to the output of:pprint.pp(data)pprint.pprint(data)pprint.PrettyPrinter().pprint(data)cpython/Lib/_colorize.py
Lines 312 to 323 in 9b22261
As usual, this will respect the environment variables to control colour and the output stream's capabilities.
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response
Linked PRs
pprintoutput #145218