New submission from William Minchin :
I have a Python startup file that colorizes my prompt. This worked on Python
3.7, but breaks on Python 3.8. I'm on Windows using Powershell 6.2.3, but `cmd`
does the same.
Maybe related, but the colorization also failed on Python 3.7 if a virtual
environment was active.
I am using `colorama` to provide the ANSI color codes.
The startup files:
```
import sys
import colorama
colorama.init()
_GREEN = colorama.Fore.GREEN
_YELLOW = colorama.Fore.YELLOW
_RESET = colorama.Style.RESET_ALL
print("setting prompt, {}, {}, {}.".format(_GREEN, _YELLOW, _RESET))
sys.ps1 = "{}>>> {}".format(_GREEN, _RESET)
sys.ps2 = "{}... {}".format(_YELLOW, _RESET)
print()
```
--
components: Windows
files: python_colored_prompt.png
messages: 355097
nosy: MinchinWeb, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Colored Prompt broken in REPL in Windows in 3.8
type: behavior
versions: Python 3.8
Added file: https://bugs.python.org/file48673/python_colored_prompt.png
___
Python tracker
<https://bugs.python.org/issue38552>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com