[Python-Dev] VERBOSE and DEBUG conventions.
Tim Peters
tim.one@home.com
Thu, 24 Jan 2002 20:22:47 -0500
> Supply a "set debug and log options" interface for your module, and then
> call it <wink>. Good example: the gc module.
[Steven Majewski]
> Thanks. That mostly makes sense.
> Except that I needed it to be in trace/debug mode when the module
> initialization is being done, so I can't import the module and then
> set it. I suppose I could just use another environment variable:
> $PYOBJC_DEBUG -- then I could set debug levels.
Sure. Or split out option/logging knobs into a distinct module.
> FYI: In case you're wondering why I don't just use gdb:
Nope <wink>.
> It's seems to be a meta level problem between the python runtime
> and the objective-c runtime, and I suspect the objc extensions
> in gdb must make use of the objc-runtime ( for 'po' - print object,
> for example.) because I seem to be causing another objc runtime
> exception the act of examining things in the debugger.
> This is not very documented in the gdb manual, so unless I'm
> going to wade thru the sources, I though it would be easier just
> to instrument the module. (and maybe Python.)
Upgrade your OS to Windows and all these time-consuming *choices* go away.
Got a bug? Great! There's nowhere to report it that isn't a black hole,
and you can't even think about patching the sources, so you just live with
it and buy another OS next year. Except for all the bugs you have to learn
to endure, it makes life much simpler <wink>.