From c047f154005546cf102d25c6c33607e7155b8fba Mon Sep 17 00:00:00 2001 From: Kentaro Wada Date: Sun, 19 Jun 2016 20:11:06 +0900 Subject: [PATCH] Remove dependency on python-termcolor Fix #413 --- jsk_tools/package.xml | 1 - jsk_tools/src/jsk_tools/sanity_lib.py | 5 ++--- jsk_tools/test/python/test_sanity_lib.py | 2 -- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/jsk_tools/package.xml b/jsk_tools/package.xml index feccb3f46..90279c241 100644 --- a/jsk_tools/package.xml +++ b/jsk_tools/package.xml @@ -21,7 +21,6 @@ python-colorama python-pygithub3 python-slacker-cli - python-termcolor python-texttable rosgraph_msgs rospy diff --git a/jsk_tools/src/jsk_tools/sanity_lib.py b/jsk_tools/src/jsk_tools/sanity_lib.py index 0381e21fb..c22d000de 100644 --- a/jsk_tools/src/jsk_tools/sanity_lib.py +++ b/jsk_tools/src/jsk_tools/sanity_lib.py @@ -16,7 +16,6 @@ pip install colorama""" sys.exit(1) from colorama import Fore, Style -import termcolor def okMessage(msg): print Fore.GREEN + "[OK] %s" % (msg) + Fore.RESET @@ -66,9 +65,9 @@ def __init__(self, topic_name, timeout=5, echo=False, data_class=None): def callback(self, msg): if self.echo and self.msg is None: # this is first time - termcolor.cprint('--- Echo %s' % self.topic_name, 'magenta') + print(colored('--- Echo %s' % self.topic_name, 'purple')) field_filter = rostopic.create_field_filter(echo_nostr=False, echo_noarr=True) - termcolor.cprint(genpy.message.strify_message(msg, field_filter=field_filter), 'cyan') + print(colored(genpy.message.strify_message(msg, field_filter=field_filter), 'cyan')) self.msg = msg def check(self): diff --git a/jsk_tools/test/python/test_sanity_lib.py b/jsk_tools/test/python/test_sanity_lib.py index 925b9fb94..7849833d6 100755 --- a/jsk_tools/test/python/test_sanity_lib.py +++ b/jsk_tools/test/python/test_sanity_lib.py @@ -11,8 +11,6 @@ import rospy import std_msgs.msg -import termcolor - class TestSanityLib(unittest.TestCase):