Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.013 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'from:addr:yahoo.co.uk': 0.04; 'lawrence': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; "'w',": 0.16; 'behave': 0.16; 'michael,': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'sys.stdout': 0.16; 'wrote:': 0.18; 'import': 0.22; 'header :User-Agent:1': 0.23; 'header:X-Complaints-To:1': 0.27; 'header :In-Reply-To:1': 0.27; 'ball': 0.31; 'subject:from': 0.34; 'subject: (': 0.35; 'in.': 0.36; 'opposed': 0.36; 'next': 0.36; 'should': 0.36; 'effort': 0.37; 'two': 0.37; 'to:addr:python- list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'black': 0.61; 'watching': 0.68; '8bit%:100': 0.72; 'white,': 0.84; 'received:89': 0.85; 'why?': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: Changing filenames from Greeklish => Greek (subprocess complain) Date: Mon, 03 Jun 2013 10:00:23 +0100 References: <2c425f2b-99de-4453-964e-c585f2043f71@googlegroups.com> <749e23ce-9b40-4ed4-aa6a-b06c2d7a1c24@googlegroups.com> <18755849-35bc-4925-811a-8f6f9fb5bf9c@googlegroups.com> <8c16324f-da12-44ff-bf2f-4ae56f9127c0@googlegroups.com> <08d3f040-8f29-414c-a24e-c728cd387278@googlegroups.com> <1e3ee6bc-f14c-4ffd-861b-7bab16e8b750@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: host-89-240-174-199.as13285.net User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 In-Reply-To: <1e3ee6bc-f14c-4ffd-861b-7bab16e8b750@googlegroups.com> X-Antivirus: avast! (VPS 130602-1, 02/06/2013), Outbound message X-Antivirus-Status: Clean X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 27 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1370250030 news.xs4all.nl 16007 [2001:888:2000:d::a6]:52027 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:46779 On 03/06/2013 07:11, Νικόλαος Κούρας wrote: > Thankls Michael, > > are these two behave the same in your opinion? > > sys.stdout = os.fdopen(1, 'w', encoding='utf-8') > > which is what i have now > opposed to this one > > import ocdecs > sys.stdout = codecs.getwriter("utf-8")(sys.stdout.detach()) > > Which one should i keep and why? > import ocdecs? Sums up perfectly the amount of effort you put in. -- "Steve is going for the pink ball - and for those of you who are watching in black and white, the pink is next to the green." Snooker commentator 'Whispering' Ted Lowe. Mark Lawrence