On Sep 3, 6:31 pm, Uwe Schmitt <[EMAIL PROTECTED]> wrote:
> On 2 Sep., 18:55, Steven D'Aprano <[EMAIL PROTECTED]
>
>
>
> cybersource.com.au> wrote:
> > I find myself writing command line tools in Python where I wish to
> > include "verbose" output to stdout.
>
> > I start with a helper function:
>
Steven D'Aprano <[EMAIL PROTECTED]> writes:
> On Tue, 02 Sep 2008 13:07:33 -0400, Joe Riopel wrote:
>
> > On Tue, Sep 2, 2008 at 12:55 PM, Steven D'Aprano
> > <[EMAIL PROTECTED]> wrote:
> >> Is there a better way of doing this than the way I am going about it?
> >
> > Would the logging module he
On Tue, 02 Sep 2008 13:07:33 -0400, Joe Riopel wrote:
> On Tue, Sep 2, 2008 at 12:55 PM, Steven D'Aprano
> <[EMAIL PROTECTED]> wrote:
>> Is there a better way of doing this than the way I am going about it?
>
> Would the logging module help, and just print the output to the stdout
> (or a file) i
2008/9/3 Hendrik van Rooyen <[EMAIL PROTECTED]>:
>
> Steven D'Aprano wrote:
>
>>Is there a better way of doing this than the way I am going about it?
>
> Not sure if its "better", but I would keep the messages in a table or dict and
> have different tables or dicts for different levels of verbosit
On 2 Sep., 18:55, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> I find myself writing command line tools in Python where I wish to
> include "verbose" output to stdout.
>
> I start with a helper function:
>
> def print_(obj, level=0):
> if _verbosity >= level:
> print
John Machin a écrit :
On Sep 3, 3:52 am, Mensanator <[EMAIL PROTECTED]> wrote:
On Sep 2, 11:55 am, Steven D'Aprano <[EMAIL PROTECTED]
if (p & 1)==1:
print_evens = True
else:
print_evens = False
if (p & 2)==2:
print_odds = True
else:
print_odds = False
if (p & 4)==4:
Steven D'Aprano wrote:
>Is there a better way of doing this than the way I am going about it?
Not sure if its "better", but I would keep the messages in a table or dict and
have different tables or dicts for different levels of verbosity, and write a
displayer that knows about the verbosity - T
On Sep 2, 4:14 pm, John Machin <[EMAIL PROTECTED]> wrote:
> On Sep 3, 3:52 am, Mensanator <[EMAIL PROTECTED]> wrote:
>
> > On Sep 2, 11:55 am, Steven D'Aprano <[EMAIL PROTECTED]
>
> > if (p & 1)==1:
> > print_evens = True
> > else:
> > print_evens = False
> > if (p & 2)==2:
> > pr
On Sep 3, 3:52 am, Mensanator <[EMAIL PROTECTED]> wrote:
> On Sep 2, 11:55 am, Steven D'Aprano <[EMAIL PROTECTED]
>
> if (p & 1)==1:
> print_evens = True
> else:
> print_evens = False
> if (p & 2)==2:
> print_odds = True
> else:
> print_odds = False
> if (p & 4)==4:
>
On Sep 2, 5:55 pm, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> I find myself writing command line tools in Python where I wish to
> include "verbose" output to stdout.
>
> I start with a helper function:
>
> def print_(obj, level=0):
> if _verbosity >= level:
> print
Steven D'Aprano schrieb:
I find myself writing command line tools in Python where I wish to
include "verbose" output to stdout.
I start with a helper function:
def print_(obj, level=0):
if _verbosity >= level:
print obj
And then I end up with functions or methods looking like th
On Sep 2, 11:55 am, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> I find myself writing command line tools in Python where I wish to
> include "verbose" output to stdout.
>
> I start with a helper function:
>
> def print_(obj, level=0):
> if _verbosity >= level:
> prin
On Tue, Sep 2, 2008 at 12:55 PM, Steven D'Aprano
<[EMAIL PROTECTED]> wrote:
> Is there a better way of doing this than the way I am going about it?
Would the logging module help, and just print the output to the stdout
(or a file) instead?
--
http://mail.python.org/mailman/listinfo/python-list
13 matches
Mail list logo