How to write verbose scripts

Ben Finney bignose+hates-spam at
Thu Sep 4 15:10:32 CEST 2008

Steven D'Aprano <steve at> 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
> > <steve at> 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?
> Thank you to everyone who answered.
> As I feared, it seems that there's no really simple way of dealing with 
> arbitrary messages at arbitrary parts of my code.

I would think the 'logging' module *is* the simple way to do this. At
least, it's as simple as it could be without leading to massive
re-visiting of the "arbitrary parts of one's code" when later desiring
to change the way the messages are handled.

 \         “We must become the change we want to see.” —Mahatma Gandhi |
  `\                                                                   |
_o__)                                                                  |
Ben Finney

More information about the Python-list mailing list