comparison src/tools/common/ansi.py @ 2167:4b78b4c7f805

core, frontends: various fixes for Libervia: - quick_app: don't fail when we can't get autodisconnect parameter - bridge: removed useless BridgeFrontend parent class - use of TypeError, unicode and list to workaround Pyjamas incompatibilities
author Goffi <goffi@goffi.org>
date Sun, 26 Feb 2017 18:23:01 +0100
parents a0fbb2b11fd0
children d3e48c9a255e
comparison
equal deleted inserted replaced
2166:1b3fbb76984b 2167:4b78b4c7f805
42 return u''.join(args) 42 return u''.join(args)
43 43
44 44
45 try: 45 try:
46 tty = sys.stdout.isatty() 46 tty = sys.stdout.isatty()
47 except AttributeError: 47 except (AttributeError, TypeError): # FIXME: TypeError is here for Pyjamas, need to be removed
48 tty = False 48 tty = False
49 if not tty: 49 if not tty:
50 # we don't want ANSI escape codes if we are not outputing to a tty! 50 # we don't want ANSI escape codes if we are not outputing to a tty!
51 for attr in dir(ANSI): 51 for attr in dir(ANSI):
52 if isinstance(getattr(ANSI, attr), basestring): 52 if isinstance(getattr(ANSI, attr), basestring):