Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news2.arglkargh.de!news.mixmin.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed3.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.010 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'output': 0.05; 'startup': 0.05; 'debug': 0.07; 'dan': 0.09; 'oh,': 0.09; 'yeah,': 0.09; 'cc:addr:python-list': 0.11; '(just': 0.16; 'introduces': 0.16; 'received:74.55.86': 0.16; 'received:74.55.86.74': 0.16; 'received:smtp.webfaction.com': 0.16; 'received:webfaction.com': 0.16; 'wrote:': 0.18; 'module': 0.19; 'fit': 0.20; 'command': 0.22; '>>>': 0.22; 'cc:addr:python.org': 0.22; 'header:User- Agent:1': 0.23; 'subject:problem': 0.24; 'mon,': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'logging': 0.26; 'least': 0.26; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'am,': 0.29; 'quickly': 0.29; "i'm": 0.30; 'testing.': 0.31; 'development.': 0.33; 'subject:with': 0.35; 'johnson': 0.35; 'module.': 0.36; 'should': 0.36; 'files': 0.38; 'pm,': 0.38; 'little': 0.38; 'does': 0.39; 'sure': 0.39; 'release': 0.40; 'easy': 0.60; 'subject:"': 0.60; 'subject:The': 0.64; 'more': 0.64; 'to:addr:gmail.com': 0.65; 'default': 0.69; 'feeding,': 0.84; 'hate': 0.91; 'try.': 0.91; 'rick': 0.93; '2013': 0.98 Date: Sun, 02 Jun 2013 16:45:40 -0400 From: Ned Batchelder User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 MIME-Version: 1.0 To: Rick Johnson Subject: Re: PyWart: The problem with "print" References: <687dea63-84da-4c45-9366-cb5a10665d1f@googlegroups.com> <7fea8f79-830c-4d82-a899-eb2fcc1e6cdc@googlegroups.com> In-Reply-To: <7fea8f79-830c-4d82-a899-eb2fcc1e6cdc@googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: , Newsgroups: comp.lang.python Message-ID: Lines: 21 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1370205952 news.xs4all.nl 15867 [2001:888:2000:d::a6]:47901 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:46734 On 6/2/2013 2: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. > Rick, you should give the logging module a try. The default configuration from basicConfig is that the messages all go to stderr, so no log files to deal with. And it's configurable in the ways you want, plus a lot more. --Ned.