mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Added support for Windows color output using colorama (if installed)
This commit is contained in:
parent
4883e1eba2
commit
0058b4d4bb
@ -55,7 +55,12 @@ def color_terminal():
|
|||||||
|
|
||||||
|
|
||||||
def nocolor():
|
def nocolor():
|
||||||
codes.clear()
|
# check if colorama is installed to support color on Windows
|
||||||
|
try:
|
||||||
|
import colorama
|
||||||
|
colorama.init()
|
||||||
|
except ImportError:
|
||||||
|
codes.clear()
|
||||||
|
|
||||||
def coloron():
|
def coloron():
|
||||||
codes.update(_orig_codes)
|
codes.update(_orig_codes)
|
||||||
|
Loading…
Reference in New Issue
Block a user