From 41e568e223b636ff86c41092e895450824c33aed Mon Sep 17 00:00:00 2001 From: Oliver Brandt Date: Tue, 15 Dec 2015 09:54:38 +0100 Subject: [PATCH 1/2] colorama added as submodule in order to support ANSI sequences under windows --- .gitmodules | 3 +++ lib/colorama | 1 + 2 files changed, 4 insertions(+) create mode 160000 lib/colorama diff --git a/.gitmodules b/.gitmodules index 111c39c..73dce8c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,3 +2,6 @@ path = lib/pyyaml url = https://github.com/anishathalye/pyyaml ignore = dirty +[submodule "lib/colorama"] + path = lib/colorama + url = https://github.com/tartley/colorama.git diff --git a/lib/colorama b/lib/colorama new file mode 160000 index 0000000..44dc8af --- /dev/null +++ b/lib/colorama @@ -0,0 +1 @@ +Subproject commit 44dc8af9bc8111b70dd046a822bb26c851ba3687 From e3255d583e12d8869394a60ee0ea7eaecd24c25c Mon Sep 17 00:00:00 2001 From: Oliver Brandt Date: Tue, 15 Dec 2015 09:58:19 +0100 Subject: [PATCH 2/2] use colorama in order to support ANSI sequences under windows --- bin/dotbot | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/dotbot b/bin/dotbot index e9b432b..0c7d427 100755 --- a/bin/dotbot +++ b/bin/dotbot @@ -15,6 +15,12 @@ if sys.version_info[0] >= 3: else: inject('pyyaml/lib') +# Support ANSI sequences under windows +if os.name == "nt": + inject('colorama') + import colorama + colorama.init() + if os.path.exists(os.path.join(PROJECT_ROOT_DIRECTORY, 'dotbot')): if PROJECT_ROOT_DIRECTORY not in sys.path: sys.path.insert(0, PROJECT_ROOT_DIRECTORY)