Path: csiph.com!usenet.pasdenom.info!news.franciliens.net!news.muarf.org!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed4.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.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'handler': 0.05; 'output': 0.05; 'startup': 0.05; 'debug': 0.07; 'dev': 0.07; 'dan': 0.09; 'instance.': 0.09; 'oh,': 0.09; 'release,': 0.09; 'yeah,': 0.09; '(just': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'introduces': 0.16; 'stderr': 0.16; 'wrote:': 0.18; 'looked': 0.18; 'module': 0.19; 'fit': 0.20; 'command': 0.22; '>>>': 0.22; 'certainly': 0.24; 'subject:problem': 0.24; 'mon,': 0.24; 'file.': 0.24; 'logging': 0.26; 'least': 0.26; 'header:In-Reply-To:1': 0.27; 'michael': 0.29; 'chris': 0.29; 'am,': 0.29; 'quickly': 0.29; 'is?': 0.30; 'message- id:@mail.gmail.com': 0.30; "i'm": 0.30; 'easier': 0.31; 'too.': 0.31; '>>>>': 0.31; 'testing.': 0.31; 'file': 0.32; 'run': 0.32; 'development.': 0.33; 'not.': 0.33; 'sense': 0.34; 'subject:with': 0.35; 'received:209.85': 0.35; 'except': 0.35; 'received:209.85.220': 0.35; 'johnson': 0.35; 'received:google.com': 0.35; 'module.': 0.36; 'received:209': 0.37; 'to:addr:python-list': 0.38; 'files': 0.38; 'pm,': 0.38; 'little': 0.38; 'does': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'release': 0.40; 'even': 0.60; 'easy': 0.60; 'subject:"': 0.60; 'most': 0.60; 'services,': 0.61; 'subject:The': 0.64; 'provide': 0.64; 'more': 0.64; 'feeding,': 0.84; 'hate': 0.91; 'rick': 0.93; '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=G2LR0WqkARVhTdSLn4Ezgwe6gn55TXowdq0YhWlrrF8=; b=TQOjk9ST/HhG/NyPkN0gfQmzKsU4RZ1YN9+1R1l6RZlxtCiqBSL/HmBzCkkENuaF// Vh4LnHLnHDmwSxmMDCyyvqT/m6t48ff27OOVEs1IstRqCp50NIpKjy8n5/bcj27URJpE u+o36rDr/66QyRfpDe4IgDGVRehXZUC6raE2+SDWb0vLwBjcblXeyh7GdrEg73+gRuEq xlNnNWzXw/SLLHzWpGmuK8s6xvtgJma9hiPDuy53xMn1w1o0zlH7INwAIxlSsCavzwhQ H4Jlfj6ty0cPQBRLS9DAjKj9WXaXK8GbBRn9zjkB+yS2Wm4GfJm3HYlJ30qlrCrkeAuG OMlw== MIME-Version: 1.0 X-Received: by 10.52.155.67 with SMTP id vu3mr13932061vdb.94.1370243832856; Mon, 03 Jun 2013 00:17:12 -0700 (PDT) In-Reply-To: <51AC2E68.4050507@gmail.com> References: <687dea63-84da-4c45-9366-cb5a10665d1f@googlegroups.com> <7fea8f79-830c-4d82-a899-eb2fcc1e6cdc@googlegroups.com> <51AC2E68.4050507@gmail.com> Date: Mon, 3 Jun 2013 17:17:12 +1000 Subject: Re: PyWart: The problem with "print" 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: 25 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1370243836 news.xs4all.nl 15882 [2001:888:2000:d::a6]:53049 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:46774 On Mon, Jun 3, 2013 at 3:49 PM, Michael Torrie wrote: > On 06/02/2013 12:18 PM, Rick Johnson wrote: >> On Sunday, June 2, 2013 12:49:02 PM UTC-5, Dan Sommers wrote: >>> On Mon, 03 Jun 2013 03:20:52 +1000, Chris Angelico wrote: >>>> On Mon, Jun 3, 2013 at 3:04 AM, Rick Johnson >>> [...] Or use the logging module. It's easy to get going quickly >>> (just call logging.basicConfig at startup time), and with a little >>> care and feeding, you can control the output in more ways than can >>> fit into the margin. Oh, yeah, I'm sure it introduces some >>> overhead. So does everything else. >> >> I hate log files, at least during development or testing. I prefer to >> debug on the command line or using my IDE. Log files are for release >> time, not development. > > Except that it's not. Have you even looked at what the logging module > is? It most certainly can log to stderr if you provide no logging > handler to write to a file. Plus, writing to a file actually makes a lot of sense for development too. It's far easier to run the program the same way in dev and release, which often means daemonized. I like to have Upstart manage all my services, for instance. ChrisA