idiom for debug code? [1/1]
Dan Perl
danperl at rogers.com
Sat Oct 2 23:36:03 EDT 2004
"Dan Perl" <danperl at rogers.com> wrote in message
news:yeadnZwsvvKa7cLcRVn-pA at rogers.com...
> Thanks, Ian. It's late Saturday for me now so I will look more at the
> code later, but so far what I get from what you sent is only dprint and
> that is a logging utility. That's not what I was looking for. OTOH, I
> see that your posting was probably only a first installment, so I am
> looking forward to more details, including more parts from your utility
> module.
I just realized that maybe you meant that posting to be the only one and not
an installment, hence the one of ONE ([1/1]). Too bad. Could you post also
the rest of your utility script? Or would that break some copyright (do you
own it?)?
> The solution that you are using for the dprint utility involves a global
> variable. How do you change its value? Is that still by making a change
> in the code, even if the change is only one place? I would like a
> solution that does not involve any change in the code and is determined
> strictly at run-time. I was thinking of something like an environment
> variable or a configuration attribute. Of course, your solution can be
> adapted to set the global variable based on an environment variable or
> based on configuration.
>
> As for rewriting your code, did you take a look at the newsgroup thread
> about the new logging utility?
>
> Dan
More information about the Python-list
mailing list