Python debugging quirks

Eric S. Raymond esr at thyrsus.com
Thu Dec 22 21:10:28 UTC 2016


Hal Murray <hmurray at megapathdsl.net>:
> > That doesn't sound possible to me.  Think about how an interpreter works.
> 
> Do you have a better suggestion?
> 
> It said:
> >   File "/usr/local/lib/python2.7/site-packages/ntp/util.py", line 273, in 
> > summary
> >     sys.stderr.write("DNS lookup ends.\n")
> > NameError: global name 'logfp' is not defined
> 
> There is no logfp in there.  (That's why I was editing it.)
> I botched the edit.  The actual buggy code was self/logfp.write...
> 
> My claim is that the interpreter is doing the right thing and finds the local 
> util.pyc but the debugger isn't following the same search rules and finds the 
> wrong util.py
> 
> Or something like that.

Do you still have this problem?  Did you ever figure out what was going on?
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>


More information about the devel mailing list