Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'calls.': 0.09; 'escape': 0.09; 'subject:characters': 0.09; 'wrapper': 0.09; 'yeah,': 0.09; 'api': 0.11; 'cc:addr:python-list': 0.11; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'function"': 0.16; 'itself,': 0.16; 'outputs': 0.16; 'stdout': 0.16; 'subject:Unicode': 0.16; 'wrote:': 0.18; 'seems': 0.21; 'code,': 0.22; 'aug': 0.22; 'cc:addr:python.org': 0.22; 'subject:problem': 0.24; 'cc:2**0': 0.24; 'source': 0.25; 'least': 0.26; 'header:In- Reply-To:1': 0.27; 'function': 0.29; 'am,': 0.29; 'characters': 0.30; 'message-id:@mail.gmail.com': 0.30; 'work.': 0.31; '(used': 0.31; 'subject:some': 0.31; 'subject:with': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'so,': 0.37; 'little': 0.38; 'anything': 0.39; "couldn't": 0.39; '"just': 0.84; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=fdYd7HkhVjU18MVN1q+ktw6Wz3doV+hB26LqGf0TiS0=; b=p2fG4Ih9A0kCPwSlQ5GL49frBt/MOG6GMUsG9C/dOIdxdEss55IgAcrzZNd68aN49Y wbEexJmdRwnRmMGKaRqG5tvT7PhHnkjyUmnOy3v+YvwTjjtl/G1/MHZkG1rquarSvMG9 ZaNmGaTdZvndRgLkWE+lJ5hMUHMdZ7YH2Jud8KHH+ztcgBWvpPSVwPvxnrr4iVcMJmb9 HFgEzyAschtcwFBV7LnrvLIDxOQvMpfXkbEvs51fKyTGiLiAkvVT/lIZnw2crUaC9jfl RSZmebpbJS/d4Z81yZF2fmsOpTCSLWIvgvGYOAI+TCyQhrNRoSx3nLq08ODehCqlZYxf mt8A== MIME-Version: 1.0 X-Received: by 10.42.230.212 with SMTP id jn20mr4132316icb.59.1407172001949; Mon, 04 Aug 2014 10:06:41 -0700 (PDT) In-Reply-To: <1hdz57o67rhxx$.198mzdgo1ztk8.dlg@40tude.net> References: <1hdz57o67rhxx$.198mzdgo1ztk8.dlg@40tude.net> Date: Tue, 5 Aug 2014 03:06:41 +1000 Subject: Re: cmd.exe on WIndows - problem with displaying some Unicode characters From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 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: 13 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1407172010 news.xs4all.nl 2856 [2001:888:2000:d::a6]:39187 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:75699 On Tue, Aug 5, 2014 at 2:48 AM, Wiktor wrote: > From colorama I just use one function - init(). Without this > initialization all those ansii escape characters (used by colorama itself, > but also by termcolor.colored()) don't work in cmd.exe. At least I couldn't > make it work. I dug into colorama's source code, and it seems that "just one function" is a little dismissive :) When you call colorama's init(), it replaces stdout with a wrapper that parses ANSI sequences and turns them into API calls. So, yeah, without that anything that outputs ANSI sequences isn't going to work. ChrisA