Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #59858 > unrolled thread
| Started by | Robin Becker <robin@reportlab.com> |
|---|---|
| First post | 2013-11-18 12:33 +0000 |
| Last post | 2013-11-18 12:33 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Unicode stdin/stdout Robin Becker <robin@reportlab.com> - 2013-11-18 12:33 +0000
| From | Robin Becker <robin@reportlab.com> |
|---|---|
| Date | 2013-11-18 12:33 +0000 |
| Subject | Re: Unicode stdin/stdout |
| Message-ID | <mailman.2839.1384778046.18130.python-list@python.org> |
On 18/11/2013 11:47, Robin Becker wrote:
...........
> #c:\python33\lib\site-packages\sitecustomize.py
> import sys, codecs
> sys.stdout = codecs.getwriter("utf-8")(sys.stdout.detach())
> sys.stderr = codecs.getwriter("utf-8")(sys.stderr.detach())
........
it seems that the above needs extra stuff to make some distutils logging work
etc etc; so now I'm using sitecustomize.py containing
import sys, codecs
sys.stdout = codecs.getwriter("utf-8")(sys.stdout.detach())
sys.stdout.encoding = 'utf8'
sys.stderr = codecs.getwriter("utf-8")(sys.stderr.detach())
sys.stderr.encoding = 'utf8'
--
Robin Becker
Back to top | Article view | comp.lang.python
csiph-web