0

On win10 using python27.

If I run my python script from the command line then the color esc codes display correctly.

If I run the same python script from within windows explorer then the color esc codes no longer work.

How can I configure windows to launch the python27.exe with color esc code support?

Derek
  • 23
  • 6
  • Does this answer your question? [Python: How can I make the ANSI escape codes to work also in Windows?](https://stackoverflow.com/questions/12492810/python-how-can-i-make-the-ansi-escape-codes-to-work-also-in-windows) – LinFelix May 06 '20 at 18:47

1 Answers1

0

Simple work around. Create a batch file to launch the python script.

Instead of running MyPython.py from the win explorer. Create a batch file MyPython.bat with the text:

MyPython.py

Running this batch file launches python from within a console and solves the problem of python created console windows not supporting ansi color esc sequences.

Derek
  • 23
  • 6