Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #59858
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsfeed.datemas.de!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder3.xlned.com!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.001 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'distutils': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'sys,': 0.09; 'sfxlen:2': 0.11; '.........': 0.16; 'codecs': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:Unicode': 0.16; 'sys.stderr': 0.16; 'sys.stdout': 0.16; 'wrote:': 0.18; 'seems': 0.21; 'import': 0.22; 'cc:addr:python.org': 0.22; 'header:User-Agent:1': 0.23; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'logging': 0.26; 'subject:/': 0.26; 'header:X-Complaints-To:1': 0.27; 'header:In- Reply-To:1': 0.27; "i'm": 0.30; 'stuff': 0.32; 'etc': 0.35; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'containing': 0.69; 'received:109': 0.72 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| To | python-list@python.org |
| From | Robin Becker <robin@reportlab.com> |
| Subject | Re: Unicode stdin/stdout |
| Date | Mon, 18 Nov 2013 12:33:49 +0000 |
| References | <5286054F.6000707@chamonix.reportlab.co.uk> <1384539385.17784.47988289.02AE655C@webmail.messagingengine.com> <5289FE6C.7030007@chamonix.reportlab.co.uk> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Gmane-NNTP-Posting-Host | 109.174.168.73 |
| User-Agent | Mozilla/5.0 (Windows NT 5.1; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 |
| In-Reply-To | <5289FE6C.7030007@chamonix.reportlab.co.uk> |
| Cc | python-ideas@python.org |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2839.1384778046.18130.python-list@python.org> (permalink) |
| Lines | 19 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1384778046 news.xs4all.nl 15918 [2001:888:2000:d::a6]:48588 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:59858 |
Show key headers only | View raw
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 comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Unicode stdin/stdout Robin Becker <robin@reportlab.com> - 2013-11-18 12:33 +0000
csiph-web