Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #96303

Re: Context-aware return

Path csiph.com!goblin3!goblin1!goblin.stu.neva.ru!uio.no!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail
Return-Path <random832@fastmail.us>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.003
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'e.g.,': 0.07; 'interpreter.': 0.07; 'alter': 0.09; 'interpreter,': 0.09; 'received:internal': 0.09; 'stdout': 0.09; 'sys.stdout': 0.09; 'thu,': 0.15; 'justified': 0.16; 'message- id:@webmail.messagingengine.com': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:messagingengine.com': 0.16; 'tty': 0.16; 'wrote:': 0.16; 'windows': 0.20; 'disable': 0.22; 'sep': 0.22; 'strip': 0.22; '(or': 0.23; 'header:In-Reply-To:1': 0.24; '(e.g.,': 0.27; 'ansi': 0.29; 'case).': 0.29; 'allows': 0.30; 'file': 0.34; 'running': 0.34; 'skip:* 20': 0.35; 'unicode': 0.35; 'there': 0.36; 'cases': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'being': 0.37; 'received:66': 0.38; 'subject:-': 0.39; 'to:addr:python.org': 0.40; 'still': 0.40; 'from:no real name:2**0': 0.60; 'behavior': 0.61; 'header:Message-Id:1': 0.61; 'talking': 0.67; 'detecting': 0.84; 'colored': 0.91
DKIM-Signature v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.us; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=HGofvOfpdRfaiq+rSCp5hzzy4PA=; b=hHfTVA q6RF1wkWqFPc0LqrHm4yhgbJ8un4xW8mA/djEh7VQYeE/aXKf3Im/Yl5CO/oCXf/ hThv0WB9LdR3Qmi1ntZ40YzYOgwcNrya7earWtWDrqxh7HnmdJMso74/JntqtpLI 6B625p97gIIvaJBfzmpUlpucTpwwFSktgoFvk=
DKIM-Signature v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=HGofvOfpdRfaiq+ rSCp5hzzy4PA=; b=lMJ54qsaMqaW8Tb5mg65D/EQx21KPzpUen4Yeqkr2deuzhl q++8NLm/X4nF83p1S137WNb7SD4NRCmcxHMnVmqJDiDbx0l1p0Uaxvy1qSQL//PY mr1SxSUbfesz8A5iPc2U4WgzDyX6ewaGAzqzCzDcITRzz7favHwCibPMPHwg=
X-Sasl-Enc utRXujh9lmM+0wyv09us3rJtf8/G5hw/zh5AjIc8fQU9 1441917746
From random832@fastmail.us
To python-list@python.org
MIME-Version 1.0
Content-Transfer-Encoding 7bit
Content-Type text/plain
X-Mailer MessagingEngine.com Webmail Interface - ajax-c76b43ce
Subject Re: Context-aware return
Date Thu, 10 Sep 2015 16:42:26 -0400
In-Reply-To <87twr26nfg.fsf@gmail.com>
References <55f1c3c6$0$1659$c3e8da3$5496439d@news.astraweb.com> <msslas$pf8$1@reader1.panix.com> <87twr26nfg.fsf@gmail.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
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.341.1441917750.8327.python-list@python.org> (permalink)
Lines 10
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1441917750 news.xs4all.nl 23817 [2001:888:2000:d::a6]:55498
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:96303

Show key headers only | View raw


On Thu, Sep 10, 2015, at 16:15, Akira Li wrote:
> There are cases when it might be justified to alter the behavior e.g.,
> *colorama* allows to strip ANSI codes (e.g., disable colored output) if
> stdout is not a tty or *win-unicode-console* make sys.stdout to use
> WriteConsoleW() to write Unicode to Windows console (interactive case).

These conditions have nothing to do with whether it is running in the
interactive interpreter, since you can still be on the console (or a
tty) without being in the interactive interpreter. What you are talking
about is detecting file redirection.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Context-aware return Steven D'Aprano <steve@pearwood.info> - 2015-09-11 03:54 +1000
  Re: Context-aware return "Sven R. Kunze" <srkunze@mail.de> - 2015-09-10 20:03 +0200
  Re: Context-aware return Ben Finney <ben+python@benfinney.id.au> - 2015-09-11 04:12 +1000
  Re: Context-aware return Ben Finney <ben+python@benfinney.id.au> - 2015-09-11 04:14 +1000
  Re: Context-aware return "Sven R. Kunze" <srkunze@mail.de> - 2015-09-10 20:21 +0200
  Re: Context-aware return "Sven R. Kunze" <srkunze@mail.de> - 2015-09-10 20:24 +0200
  Re: Context-aware return "Sven R. Kunze" <srkunze@mail.de> - 2015-09-10 20:34 +0200
  Re: Context-aware return Chris Angelico <rosuav@gmail.com> - 2015-09-11 04:39 +1000
  Re: Context-aware return Laura Creighton <lac@openend.se> - 2015-09-10 20:40 +0200
  Re: Context-aware return "Sven R. Kunze" <srkunze@mail.de> - 2015-09-10 20:45 +0200
  Re: Context-aware return "Sven R. Kunze" <srkunze@mail.de> - 2015-09-10 20:56 +0200
  Re: Context-aware return Paul Rubin <no.email@nospam.invalid> - 2015-09-10 12:19 -0700
  Re: Context-aware return Grant Edwards <invalid@invalid.invalid> - 2015-09-10 19:23 +0000
    Re: Context-aware return Akira Li <4kir4.1i@gmail.com> - 2015-09-10 23:15 +0300
      Re: Context-aware return Grant Edwards <invalid@invalid.invalid> - 2015-09-10 20:27 +0000
    Re: Context-aware return random832@fastmail.us - 2015-09-10 16:42 -0400
    Re: Context-aware return Rustom Mody <rustompmody@gmail.com> - 2015-09-11 08:55 -0700
    Re: Context-aware return Rustom Mody <rustompmody@gmail.com> - 2015-09-11 08:55 -0700
  Re: Context-aware return Denis McMahon <denismfmcmahon@gmail.com> - 2015-09-11 00:41 +0000
    Re: Context-aware return Ned Batchelder <ned@nedbatchelder.com> - 2015-09-12 16:27 -0700
      Re: Context-aware return Steven D'Aprano <steve@pearwood.info> - 2015-09-17 12:31 +1000
  Re: Context-aware return Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-09-12 03:11 +0100

csiph-web