comparison frontends/src/jp/base.py @ 2161:62dfa6e02f54

jp (base, blog, output(std)): fixed bad unicode handling in stdout, use of jp.disp instead of simple print
author Goffi <goffi@goffi.org>
date Tue, 21 Feb 2017 21:01:40 +0100
parents cee6561ad086
children c9a67eb5bf72
comparison
equal deleted inserted replaced
2160:e67e8cd24141 2161:62dfa6e02f54
249 @param verbosity(int): minimal verbosity to display the message 249 @param verbosity(int): minimal verbosity to display the message
250 @param error(bool): if True, print to stderr instead of stdout 250 @param error(bool): if True, print to stderr instead of stdout
251 """ 251 """
252 if self.verbosity >= verbosity: 252 if self.verbosity >= verbosity:
253 if error: 253 if error:
254 print >>sys.stderr,msg 254 print >>sys.stderr,msg.encode('utf-8')
255 else: 255 else:
256 print msg 256 print msg.encode('utf-8')
257 257
258 def output(self, type_, name, extra_outputs, data): 258 def output(self, type_, name, extra_outputs, data):
259 if name in extra_outputs: 259 if name in extra_outputs:
260 extra_outputs[name](data) 260 extra_outputs[name](data)
261 else: 261 else: