yachalk
yachalk copied to clipboard
Windows 10 Command Prompt support?
It doesn't work in Windows 10 Command Prompt without first adding the following:
import os
os.system('')
Is that the expected behavior? If so, can something like the above be added to the library?
Unfortunately, I have no experience with Windows. Basically all that is needed is a terminal with standard ANSI escape code support. I had also noticed this hint in the original chalk documentation. It is quite weird though that running an empty os.system
(what is that launching actually?) can have such a side effect. I'm afraid I can be of much help in this case, because I don't have access to Windows, and this sounds like an idiosyncrasy of that terminal.
Yeah, this is a really wicked thing, that can't be explained without diving into the source code of that (Windows) python library. You can look at some related technical discussion about UTF-8 with and without BOM, and how it affects the Powershell's [native vs Core] differently and does weird stuff to the terminal, depending...
See:
- https://github.com/PowerShell/PowerShell/issues/7233
- https://github.com/python/cpython/blob/99fcf1505218464c489d419d4500f126b6d6dc28/Modules/clinic/posixmodule.c.h#L1733