Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.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.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'interpreter': 0.04; 'output': 0.04; '21,': 0.07; 'python': 0.09; 'to:addr:comp.lang.python': 0.09; 'cc:addr:python-list': 0.10; 'dec': 0.15; 'screen,': 0.16; 'wrote:': 0.17; 'file.': 0.20; 'subject:problem': 0.22; 'cc:2**0': 0.23; 'cc:no real name:2**0': 0.24; 'command': 0.24; 'cc:addr:python.org': 0.25; 'header:In- Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'leave': 0.26; '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; 'idle': 0.33; 'problem': 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; 'little': 0.39; 'help': 0.40; 'your': 0.60; 'you.': 0.61; 'save': 0.61; 'details': 0.63; '8bit%:61': 0.84 Newsgroups: comp.lang.python Date: Sat, 22 Dec 2012 07:07:15 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=182.242.153.195; posting-account=Z1-aQQoAAADvnuKxr9sysEiuPIcBNfjX References: User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-IP: 182.242.153.195 MIME-Version: 1.0 Subject: Re: redirect standard output problem From: iMath To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: python-list@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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Message-ID: Lines: 37 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1356188844 news.xs4all.nl 6935 [2001:888:2000:d::a6]:60600 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:35369 =E5=9C=A8 2012=E5=B9=B412=E6=9C=8821=E6=97=A5=E6=98=9F=E6=9C=9F=E4=BA=94UTC= +8=E4=B8=8B=E5=8D=883=E6=97=B624=E5=88=8610=E7=A7=92=EF=BC=8CChris Angelico= =E5=86=99=E9=81=93=EF=BC=9A > On Fri, Dec 21, 2012 at 4:23 PM, iMath wrote: >=20 > > redirect standard output problem >=20 > > >=20 > > why the result only print A but leave out 888 ? >=20 >=20 >=20 > No idea, because when I paste your code into the Python 3.3 >=20 > interpreter or save it to a file and run it, it does exactly what I >=20 > would expect. A and 888 get sent to the screen, B and C go to the >=20 > file. >=20 >=20 >=20 > What environment are you working in? Python version, operating system, >=20 > any little details that just might help us help you. >=20 >=20 >=20 > ChrisA on WinXP + python32 =20 when I run it through command line ,it works ok ,but when I run it through = IDLE , only print A but leave out 888 so why ?