From 9428f3ca493a62d8d774b4f36c154d37c9de3f9e 2014-01-24 21:15:49 From: MinRK Date: 2014-01-24 21:15:49 Subject: [PATCH] make an ascii docstring workaround bundled numpydoc issue --- diff --git a/IPython/utils/io.py b/IPython/utils/io.py index 6fb3869..5cd2228 100644 --- a/IPython/utils/io.py +++ b/IPython/utils/io.py @@ -288,14 +288,14 @@ class capture_output(object): sys.stderr = self.sys_stderr def unicode_std_stream(stream='stdout'): - u"""Get a wrapper to write unicode to stdout/stderr as UTF-8. + r"""Get a wrapper to write unicode to stdout/stderr as UTF-8. This ignores environment variables and default encodings, to reliably write unicode to stdout or stderr. :: - unicode_std_stream().write(u'ł@e¶ŧ←') + unicode_std_stream().write(u'\u0142@e\xb6\u0167\u2190') """ assert stream in ('stdout', 'stderr') stream = getattr(sys, stream)