How to write verbose scripts
steve at REMOVE-THIS-cybersource.com.au
Thu Sep 4 11:24:28 CEST 2008
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 remove-this-cybersource.com.au> 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'm currently playing around with a few ideas, one of which is a
decorator to print information about function calls. However, what I'd
like to avoid is having to explicitly call the decorator on every method.
I guess that there's metaclass trickery I can play. Does anyone have any
pointers on how I can apply a decorator to every method in a class
More information about the Python-list