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


Groups > comp.lang.python > #35275

Re: redirect standard output problem

Path csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.011
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'interpreter': 0.04; 'output': 0.04; '21,': 0.07; 'python': 0.09; 'dec': 0.15; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'screen,': 0.16; 'wrote:': 0.17; 'file.': 0.20; 'subject:problem': 0.22; 'header:In-Reply-To:1': 0.25; 'leave': 0.26; 'message- id:@mail.gmail.com': 0.27; 'received:209.85.212': 0.28; 'run': 0.28; 'environment': 0.29; 'idea,': 0.29; 'fri,': 0.30; 'version,': 0.30; 'code': 0.31; 'system,': 0.32; 'file': 0.32; 'print': 0.32; 'problem': 0.33; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'pm,': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'operating': 0.36; 'does': 0.37; 'why': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'little': 0.39; 'header:Received:5': 0.40; 'help': 0.40; 'your': 0.60; 'you.': 0.61; 'save': 0.61; 'details': 0.63
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:to :content-type; bh=i0dCXlr06ruSunXOS2wP7Uz8fQ3a0fW9VngJvGHmmOU=; b=UWqv6iuOcxq6T/Tmjr5+GRkGj/Jvej1kEhOtws6+z0rIHfrhSSSGu+wQfohMLVnQpz 6QWQ0Pe5KienTJ7KhW7ExaxM0sbaJOlhJWeF5ZjM/9nev0eRZ2yy15bmYjGqL+UZe1Te ZN+DW0l1qQaLZ2b4CcKbwjPF7uYSJ+eP1BLxJbPMXjh0gJjHC2rDUsOTHqBUccN4wFDU Yagz3tGCuL/uxEyJXqyu63BjY3yfhPY/eiw65NYmdyBLkXLIr4cjDJS/1QA8j2uK5A5M Ydl7OUmWQiGS0k8N27Vy/KzPD50VgDJmCrQq3WfMD6CCCrSItwNRV9m/cIxGePFVcZuk jSmA==
MIME-Version 1.0
In-Reply-To <cf470745-6ee6-464c-b936-154a869af997@googlegroups.com>
References <cf470745-6ee6-464c-b936-154a869af997@googlegroups.com>
Date Fri, 21 Dec 2012 18:24:10 +1100
Subject Re: redirect standard output problem
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
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 <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1141.1356074653.29569.python-list@python.org> (permalink)
Lines 14
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1356074654 news.xs4all.nl 6919 [2001:888:2000:d::a6]:39341
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:35275

Show key headers only | View raw


On Fri, Dec 21, 2012 at 4:23 PM, iMath <redstone-cold@163.com> wrote:
> redirect standard output problem
>
> why the result only print A but leave out 888 ?

No idea, because when I paste your code into the Python 3.3
interpreter or save it to a file and run it, it does exactly what I
would expect. A and 888 get sent to the screen, B and C go to the
file.

What environment are you working in? Python version, operating system,
any little details that just might help us help you.

ChrisA

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


Thread

redirect standard output problem iMath <redstone-cold@163.com> - 2012-12-20 21:23 -0800
  Re: redirect standard output problem Chris Angelico <rosuav@gmail.com> - 2012-12-21 18:24 +1100
    Re: redirect standard output problem iMath <redstone-cold@163.com> - 2012-12-22 07:07 -0800
      Re: redirect standard output problem Chris Angelico <rosuav@gmail.com> - 2012-12-23 02:15 +1100
      Re: redirect standard output problem Terry Reedy <tjreedy@udel.edu> - 2012-12-22 16:02 -0500
    Re: redirect standard output problem iMath <redstone-cold@163.com> - 2012-12-22 07:07 -0800
  Re: redirect standard output problem Hans Mulder <hansmu@xs4all.nl> - 2012-12-21 14:42 +0100
  Re: redirect standard output problem Dave Angel <d@davea.name> - 2012-12-21 09:36 -0500

csiph-web