Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!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.014 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'output': 0.05; 'subject: + ': 0.07; 'python': 0.11; '(via': 0.16; 'code?': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'function).': 0.16; 'stdout': 0.16; 'subject:embed': 0.16; 'wrote:': 0.18; 'looked': 0.18; 'thu,': 0.19; 'headers': 0.24; 'specify': 0.24; 'file.': 0.24; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'easier': 0.31; '"please': 0.31; '25,': 0.31; 'file': 0.32; 'but': 0.35; 'received:google.com': 0.35; 'really': 0.36; 'subject:?': 0.36; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'simply': 0.61; 'jul': 0.74; 'disrupt': 0.84; 'redirecting': 0.84; '2013': 0.98 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=0jWswHtJz39zhe+VpLnFD4VwP76JL7svtRh4x6Qpxk0=; b=yG7vNX5qans20A8xD3QjJeAxvRtuKHKl0ApWqNtZ1EBgBkw2CatlWNb+P2xP93jVw3 Wky6L/XoQTTTHkNqGAJti9biWrrraXYqAEzYg55x0NiEK9KHWRxdNt9cevsbX0tijB8T hb2t+19tm0bI6jLRyjDmJodGdymOaI4Iid9HsyHE2ixryPKW9D6mjmjHbXYKkwMzURY7 Oj/Uky6GAwQIn5W6GGLkPIv7qPgSMd/fkNiKueyVaG8/DB4i8DsW26RogNQPuW124wjp dJdL9XKvQu9lBcCfphK3W1YgononaFWiHJI9/6UNWoU4g7wu+YBX9HdQVOW9tzokN/LA niVA== MIME-Version: 1.0 X-Received: by 10.58.187.4 with SMTP id fo4mr14937352vec.55.1374683147607; Wed, 24 Jul 2013 09:25:47 -0700 (PDT) In-Reply-To: <54e0ad8a-2f27-445f-9abb-49addf107430@googlegroups.com> References: <6c1a5595-b2f7-4712-8c9c-be664dd8ed18@googlegroups.com> <823607d0-9365-4dbb-b80c-8221bb514b01@googlegroups.com> <54e0ad8a-2f27-445f-9abb-49addf107430@googlegroups.com> Date: Thu, 25 Jul 2013 02:25:47 +1000 Subject: Re: how: embed + extend to control my running app? From: Chris Angelico 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 9 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1374683156 news.xs4all.nl 15944 [2001:888:2000:d::a6]:42845 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:51148 On Thu, Jul 25, 2013 at 2:10 AM, David M. Cotter wrote: > So: i really want it to go to my own log file (via my Log() function). now, can i specify "please output to this FILE*" ?, i looked at all the python c headers but found nothing about redirecting the output. Are you able to simply redirect the OS-level stdout handle, or would that disrupt your own code? That might be an easier way to log to a file. ChrisA