Path: csiph.com!au2pb.net!2.us.feeder.erje.net!feeder.erje.net!1.eu.feeder.erje.net!fu-berlin.de!uni-berlin.de!not-for-mail From: Terry Reedy Newsgroups: comp.lang.python Subject: Re: Python IO Redirection to Console Date: Sun, 13 Dec 2015 14:13:04 -0500 Lines: 16 Message-ID: References: <36dcb7f1-53a1-42a1-b0de-94b919decb42@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de EcoYaIx3g+tys514dPWs7AGdF6Q5IJBK8IbNxbjzuZmw== 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; 'subject:Python': 0.05; 'default.': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.10; 'jan': 0.11; 'explicitly': 0.15; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'reedy': 0.16; 'stdin': 0.16; 'wrote:': 0.16; 'trying': 0.22; 'am,': 0.23; 'needed.': 0.23; 'header:In- Reply-To:1': 0.24; 'module': 0.25; 'header:User-Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'least': 0.27; 'windows,': 0.29; 'run': 0.33; 'stream': 0.33; 'file': 0.34; 'this?': 0.34; 'question,': 0.35; 'there': 0.36; 'received:71': 0.36; 'to:addr :python-list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'anything': 0.38; 'to:addr:python.org': 0.40; 'default': 0.61; 'console,': 0.84; 'received:fios.verizon.net': 0.91 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: pool-71-185-227-36.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 In-Reply-To: <36dcb7f1-53a1-42a1-b0de-94b919decb42@googlegroups.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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:100385 On 12/13/2015 9:14 AM, austin aigbe wrote: > I am trying to redirect the IO (stdout, stdin and stderr) to the console. For a program run from the console, console IO is the default. One must explicitly redirect to a file stream or pipe. At least on Windows, console IO is also the default for a program run with subprocess. Again, anything else must explicitly given. > Is there a Python module for this? Unless I have completely misunderstood the question, not needed. -- Terry Jan Reedy