[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gzz] Debug outputs.
From: |
Tuomas Lukka |
Subject: |
Re: [Gzz] Debug outputs. |
Date: |
Sat, 3 May 2003 18:35:07 +0300 |
User-agent: |
Mutt/1.4.1i |
On Sat, May 03, 2003 at 12:27:22PM +0200, Benja Fallenstein wrote:
> Tuomas Lukka wrote:
> >On Fri, May 02, 2003 at 12:15:41AM +0300, Matti Katila wrote:
> >
> >>Hi,
> >>
> >>It's pain to try to switch off all debug msgs because no source is
> >>told!
> >
> >How about PEGging this to be the official line?
>
> Should.
>
> >>So I propouse we would use something like:
> >>
> >>Java:
> >>public class Foo {
> >> private void pa(String s) { System.out.println("Foo:: "+s); }
> >>}
> >
> >This is fine with me
>
> Could we make this p(String s), please?
Ok, I guess yes now that everywhere has been converted to pa().
> >>python:
> >>file: libvob.vob.putil.foo.py
> >>
> >>def pa(s):
> >> print 'vob.putil.foo:: ',s
> >
> >Also fine
>
> I don't like this; I like using 'print' better. Why not
>
> print >> dbg, s
>
> and make it so that printing to dbg prepends 'vob.putil.foo:: ' and is
> skipped if debug is set to off?
>
> I guess we could import it from somewhere, so that at the top of the
> file we only need to say:
>
> dbg = Dbg(__name__)
Sounds like a really good idea.
Tuomas