comparison src/tools/common/ansi.py @ 2196:d3e48c9a255e

plugin XEP-0060: added getConfiguration ad psNodeConfigurationGet bridge method
author Goffi <goffi@goffi.org>
date Mon, 13 Mar 2017 23:18:00 +0100
parents 4b78b4c7f805
children 8b37a62336c3
comparison
equal deleted inserted replaced
2195:d65275ac39b3 2196:d3e48c9a255e
33 def color(cls, *args): 33 def color(cls, *args):
34 """output text using ANSI codes 34 """output text using ANSI codes
35 35
36 this method simply merge arguments, and add RESET if is not the last arguments 36 this method simply merge arguments, and add RESET if is not the last arguments
37 """ 37 """
38 # XXX: we expect to have at least on argument 38 # XXX: we expect to have at least one argument
39 if args[-1] != cls.RESET: 39 if args[-1] != cls.RESET:
40 args = list(args) 40 args = list(args)
41 args.append(cls.RESET) 41 args.append(cls.RESET)
42 return u''.join(args) 42 return u''.join(args)
43 43