Re: Python debugging quirks

2016-12-22 Thread Hal Murray
e...@thyrsus.com said: >> 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

Re: Python debugging quirks

2016-12-22 Thread Eric S. Raymond
Hal Murray : > > 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: glo

Re: Python debugging quirks

2016-12-14 Thread Hal Murray
> 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

Re: Python debugging quirks

2016-12-14 Thread Eric S. Raymond
Hal Murray : > > I think I figured out one contribution to my confusion. > > When printing out a backtrace, it uses the text from the installed version > but it's actually running the local code. > > [murray@hgm ntpclients]$ ./ntpmon ntp-wifi > Traceback (most recent call last): > File "./ntp

Python debugging quirks

2016-12-14 Thread Hal Murray
I think I figured out one contribution to my confusion. When printing out a backtrace, it uses the text from the installed version but it's actually running the local code. [murray@hgm ntpclients]$ ./ntpmon ntp-wifi Traceback (most recent call last): File "./ntpmon", line 164, in variabl