##// END OF EJS Templates
Merge branch 'unicode-win-process' of https://github.com/takluyver/ipython into takluyver-unicode-win-process
Thomas Kluyver -
r3535:ca434b70 merge
parent child Browse files
Show More
@@ -88,9 +88,12 b' def _find_cmd(cmd):'
88
88
89 def _system_body(p):
89 def _system_body(p):
90 """Callback for _system."""
90 """Callback for _system."""
91 enc = sys.stdin.encoding or sys.getdefaultencoding()
91 for line in read_no_interrupt(p.stdout).splitlines():
92 for line in read_no_interrupt(p.stdout).splitlines():
93 line = line.decode(enc, 'replace')
92 print(line, file=sys.stdout)
94 print(line, file=sys.stdout)
93 for line in read_no_interrupt(p.stderr).splitlines():
95 for line in read_no_interrupt(p.stderr).splitlines():
96 line = line.decode(enc, 'replace')
94 print(line, file=sys.stderr)
97 print(line, file=sys.stderr)
95
98
96
99
@@ -44,6 +44,10 b' class OutStream(object):'
44 else:
44 else:
45 data = self._buffer.getvalue()
45 data = self._buffer.getvalue()
46 if data:
46 if data:
47 # Make sure that we're handling unicode
48 if not isinstance(data, unicode):
49 enc = sys.stdin.encoding or sys.getdefaultencoding()
50 data = data.decode(enc, 'replace')
47 content = {u'name':self.name, u'data':data}
51 content = {u'name':self.name, u'data':data}
48 msg = self.session.send(self.pub_socket, u'stream',
52 msg = self.session.send(self.pub_socket, u'stream',
49 content=content,
53 content=content,
General Comments 0
You need to be logged in to leave comments. Login now