New submission from Tithen Firion:
Windows 10 supports ANSI Escape Sequences (
http://stackoverflow.com/a/38617204/2428152
https://msdn.microsoft.com/en-us/library/windows/desktop/mt638032(v=vs.85).aspx
) but Python just prints escape character. Adding `subprocess.call('',
shell=True)` before printing solved the issue.
Test code:
import subprocess
print('\033[0;31mTEST\033[0m')
subprocess.call('', shell=True)
print('\033[0;31mTEST\033[0m')
output in attachment.
Haven't tested it on other Python versions but it probably occurs on them too.
----------
components: IO
files: example.png
messages: 291719
nosy: Tithen Firion
priority: normal
severity: normal
status: open
title: Printing ANSI Escape Sequences on Windows 10
type: behavior
versions: Python 2.7, Python 3.6
Added file: http://bugs.python.org/file46805/example.png
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue30075>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com